Branch Coverage

blib/lib/MooseX/XSConstructor.pm
Criterion Covered Total %
branch 22 38 57.8


line true false branch
41 0 1 unless $metaclass->constructor_class eq "Moose::Meta::Method::Constructor"
42 0 1 unless $metaclass->destructor_class eq "Moose::Meta::Method::Destructor"
43 0 1 unless $metaclass->instance_metaclass eq "Moose::Meta::Instance"
48 0 1 if grep {not $_ =~ /$safe_traits/;} @metaclass_traits
53 0 2 if @bad
58 0 2 if $generated ne $expected
67 0 1 unless $self->is_suitable_class($klass)
77 1 1 if $attr->is_required
78 0 2 if $attr->is_weak_ref
79 0 2 if $attr->has_default and not $attr->is_lazy
80 1 1 if $attr->has_builder and not $attr->is_lazy
82 0 2 if $attr->has_trigger
83 1 1 if ($attr->has_type_constraint)
87 0 2 if Moose::Util::does_role($attr, "MooseX::UndefTolerant::Attribute")
89 0 2 if $attr->can("has_alias") and $attr->has_alias
95 0 1 if Moose::Util::does_role($metaclass, "MooseX::StrictConstructor::Trait::Class")
110 1 0 if ($ok and my $meta = Class::XSConstructor::get_metadata($klass)) { }
111 1 0 if (defined $meta->{'foreignclass'} and $meta->{'foreignclass'} eq 'Moose::Object' || $self->is_suitable_class($meta->{'foreignclass'}))
120 1 0 if ($meta->{'buildargs'} == \&Moose::Object::BUILDARGS)