Branch Coverage

blib/lib/Moo/Role.pm
Criterion Covered Total %
branch 64 68 94.1


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)
313 22 14 unless $INFO{$_}{'attributes'}
319 0 12 unless $INC{'Moo.pm'} and @attrs and $con_gen = 'Moo'->_constructor_maker_for($class) and $m = 'Moo'->_accessor_maker_for($class)
331 0 18 if $seen{$name}++
334 4 14 unless $m->has_eager_default($name, $spec)
348 2 10 unless @set
371 22 2 unless (exists $APPLY_DEFAULTS{$class})
374 10 14 if (my $apply_defaults = $APPLY_DEFAULTS{$class})
391 86 134 unless my $new = $me->SUPER::_install_does($to)
397 14 10 if Role::Tiny::does_role($proto, $role)
400 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'))
413 92 130 unless $attr_info and @$attr_info
417 6 4 unless $info->{'attributes'}
418 2 114 unless $con->all_attribute_specs
116 2 $con ? :
10 118 $info ? :
426 10 118 if ($info) { }
116 2 elsif ($con) { }
431 118 118 ref $_ ? :