Branch Coverage

blib/lib/Moo/Role.pm
Criterion Covered Total %
branch 66 70 94.2


line true false branch
51 4 2 if ($Moo::MAKERS{$target} and $Moo::MAKERS{$target}{'is_class'})
84 4 96 ref $name_proto eq 'ARRAY' ? :
85 4 96 if (@_ % 2 != 0)
91 4 94 @name_proto > 1 ? :
139 62 94 if ($INC{'Moo/HandleMoose.pm'} and not $Moo::sification::disabled)
166 28 22 if (not $self->SUPER::is_role($role) and ($INC{'Moose.pm'} and $meta = Class::MOP::class_of($role) and ref $meta ne "Moo::HandleMoose::FakeMetaClass" and $meta->isa("Moose::Meta::Role")) or "Mouse::Util"->can("find_meta") and $meta = Mouse::Util::find_meta($role) and $meta->isa("Mouse::Meta::Role"))
194 8 14 $is_mouse ? :
196 8 14 if ($spec->{'isa'})
200 2 6 $is_mouse ? :
221 4 4 if ($spec->{'coerce'})
254 42 174 if ($INFO{$role} and $INFO{$role}{'inhaled_from_moose'} or $INC{'Moo.pm'} and $m = "Moo"->_accessor_maker_for($target) and ref $m ne "Method::Generate::Accessor")
264 0 0 if ($INFO{$role} and $INFO{$role}{'inhaled_from_moose'})
276 2 40 unless $INFO{$role}{'attributes'}
279 32 4 if ($con_gen)
288 198 22 if ($INC{'Sub/Defer.pm'})
303 4 36 if ($INC{'Moo/HandleMoose.pm'} and not $Moo::sification::disabled)
310 40 56 if ($pack ne "Moo::Role" and $pack ne "Role::Tiny" and not $pack->isa($me))
322 22 14 unless $INFO{$_}{'attributes'}
328 0 12 unless $INC{'Moo.pm'} and @attrs and $con_gen = "Moo"->_constructor_maker_for($class) and $m = "Moo"->_accessor_maker_for($class)
340 0 18 if $seen{$name}++
343 4 14 unless $m->has_eager_default($name, $spec)
357 2 10 unless @set
380 22 2 unless (exists $APPLY_DEFAULTS{$class})
383 10 14 if (my $apply_defaults = $APPLY_DEFAULTS{$class})
400 86 134 unless my $new = $me->SUPER::_install_does($to)
406 14 10 if Role::Tiny::does_role($proto, $role)
409 4 2 if ($INC{'Moose.pm'} and $meta = Class::MOP::class_of($proto) and ref $meta ne "Moo::HandleMoose::FakeMetaClass" and $meta->can("does_role"))
422 92 130 unless $attr_info and @$attr_info
426 6 4 unless $info->{'attributes'}
427 2 114 unless $con->all_attribute_specs
116 2 $con ? :
10 118 $info ? :
435 10 118 if ($info) { }
116 2 elsif ($con) { }
440 118 118 ref $_ ? :