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 11 211 if $INC{$file}
47 207 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)
205 3 50 if $COMPOSED{'class'}{$new_name}
222 2 181 unless @roles
225 1 180 if (my(@dupes) = grep((1 == $seen{$_}++), @roles))
231 2 212 unless $me->is_role($role)
240 118 3 if exists $BACKCOMPAT_HACK{$me}
250 2 0 if $IN_APPLY_ROLES
264 1 126 if ref $to
272 19 105 if (@roles > 1)
277 3 16 if (keys %conflicts)
292 1 120 if (not $IN_APPLY_ROLES and _want_backcompat_hack($me))
308 140 404 if $role_methods = $role_methods{$role}
333 13 127 if (my(@requires_fail) = grep((!$to->can($_)), @$requires))
335 5 8 if (my $to_info = $INFO{$to}) { }
345 90 80 unless my $info = $INFO{$role}
347 0 80 unless $info->{'non_methods'}
351 79 1 unless $info->{'not_methods'}
352 79 1 unless keys %not_methods
357 1 5 if (exists $not_methods{$code})
370 136 78 if $info and $info->{'methods'}
376 398 78 if (exists $non_methods->{$sub} and $non_methods->{$sub} == $subs->{$sub})
381 78 1 if ($info)
390 1 2 unless $me->is_role($role)
391 2 0 unless $INFO{$role}{'requires'}
404 25 115 if $INFO{$to}
408 21 85 if exists $existing_methods{$i}
418 76 0 unless $i =~ /^\(/ and defined &overload::nil && $methods->{$i} == \&overload::nil || defined &overload::_nil && $methods->{$i} == \&overload::_nil
422 0 9 unless defined $overload
432 99 33 unless my $modifiers = $INFO{$name}{'modifiers'}
434 7 26 $info ? :
438 0 33 unless $modifiers
441 26 7 if (not $info)
452 6 20 unless defined $vcheck_error
454 6 0 eval {
460 0 26 if $vcheck_error
469 25 115 if $me->is_role($to)
473 60 55 unless $to->can('does')
476 56 59 if $to->can('DOES') and $to->can('DOES') != ('UNIVERSAL'->can('DOES') || 0)
481 0 5 unless $proto->$does($role)
530 28 13 if exists $APPLIED_TO{$class}{$role}