Branch Coverage

blib/lib/Role/Tiny.pm
Criterion Covered Total %
branch 88 102 86.2


line true false branch
17 0 27 "$]" < 5.009 ? :
20 0 27 "$]" < 5.011 && !("$]" >= 5.009004 && "$]" < 5.010001) ? :
21 0 27 "$]" >= 5.012 && "$]" < 5.02 ? :
35 0 0 if @{$_[0];}
42 13 266 if $INC{$file}
47 262 4 if grep((!/::\z/), keys %{_getstash($module);})
89 2 89 if $non_methods and %$non_methods
101 5 1 if (exists $old_non_methods->{$sub} and $non_methods->{$sub} != $subs->{$sub})
112 2 90 if $me->is_role($target)
128 1 90 if $me->is_role($target)
142 1 14 ref $_[0] eq 'ARRAY' ? :
187 7 46 if (length $new_name > 252)
206 3 50 if $COMPOSED{'class'}{$new_name}
223 2 181 unless @roles
226 1 180 if (my(@dupes) = grep((1 == $seen{$_}++), @roles))
232 2 212 unless $me->is_role($role)
241 118 3 if exists $BACKCOMPAT_HACK{$me}
251 2 0 if $IN_APPLY_ROLES
265 1 126 if ref $to
273 19 105 if (@roles > 1)
278 3 16 if (keys %conflicts)
293 1 120 if (not $IN_APPLY_ROLES and _want_backcompat_hack($me))
309 140 404 if $role_methods = $role_methods{$role}
334 13 127 if (my(@requires_fail) = grep((!$to->can($_)), @$requires))
336 5 8 if (my $to_info = $INFO{$to}) { }
346 90 80 unless my $info = $INFO{$role}
348 0 80 unless $info->{'non_methods'}
352 79 1 unless $info->{'not_methods'}
353 79 1 unless keys %not_methods
358 1 5 if (exists $not_methods{$code})
371 136 78 if $info and $info->{'methods'}
377 398 78 if (exists $non_methods->{$sub} and $non_methods->{$sub} == $subs->{$sub})
382 78 1 if ($info)
391 1 2 unless $me->is_role($role)
392 2 0 unless $INFO{$role}{'requires'}
405 25 115 if $INFO{$to}
409 21 85 if exists $existing_methods{$i}
419 76 0 unless $i =~ /^\(/ and defined &overload::nil && $methods->{$i} == \&overload::nil || defined &overload::_nil && $methods->{$i} == \&overload::_nil
423 0 9 unless defined $overload
433 99 33 unless my $modifiers = $INFO{$name}{'modifiers'}
435 7 26 $info ? :
439 0 33 unless $modifiers
442 26 7 if (not $info)
453 6 20 unless defined $vcheck_error
455 6 0 eval {
461 0 26 if $vcheck_error
470 25 115 if $me->is_role($to)
474 60 55 unless $to->can('does')
477 56 59 if $to->can('DOES') and $to->can('DOES') != ('UNIVERSAL'->can('DOES') || 0)
482 0 5 unless $proto->$does($role)
531 28 13 if exists $APPLIED_TO{$class}{$role}