Branch Coverage

blib/lib/Role/Inspector.pm
Criterion Covered Total %
branch 57 76 75.0


line true false branch
18 0 8 eval { do { require List::MoreUtils } } ? :
42 10 9 if $args->{'no_meta'}
52 1 34 if ($info->{'api'} and not $info->{'provides'} && $info->{'requires'})
59 1 1 $info->{'name'}->can($method) ? :
66 18 17 unless ($info->{'api'})
83 12 512 ref $_ ? :
96 1 20 unless exists $data->{'name'}
103 16 5 &blessed($attr) && $attr->can('is') ? :
104 16 5 &blessed($attr) && $attr->can('name') ? :
21 0 if $is =~ /\A(ro|rw|lazy|rwp)\z/i
109 80 25 &blessed($attr) ? :
110 0 105 if ref $method_name
111 50 55 if defined $method_name
115 0 21 if (&blessed($attr) and $attr->can('_canonicalize_handles')) { }
120 0 0 $attr->can('handles') ? :
0 0 $attr->can('_canonicalize_handles') ? :
127 0 21 if (not defined $handles) { }
0 21 elsif (not ref $handles) { }
21 0 elsif (ref $handles eq 'ARRAY') { }
0 0 elsif (ref $handles eq 'HASH') { }
289 0 25 unless defined $thing
290 0 25 if ref $thing and not &blessed($thing)
294 10 15 if $thing->can('does') and $thing->does($role)
295 5 10 if $thing->can('DOES') and $thing->DOES($role)
297 0 10 unless my $info = $me->get_role_info($role)
300 5 5 if ($info->{'type'} eq 'Role::Tiny' or $info->{'type'} eq 'Moo::Role')
302 2 3 if Role::Tiny::does_role($thing, $role)
305 3 5 if ($info->{'type'} eq 'Moose::Role')
308 1 2 if Moose::Util::does_role($thing, $role)
311 2 5 if ($info->{'type'} eq 'Mouse::Role')
314 1 1 if Mouse::Util::does_role($thing, $role)
317 6 0 unless (ref $thing)
321 3 3 if ($info2->{'type'} eq 'Role::Tiny' or $info2->{'type'} eq 'Moo::Role')
323 0 3 if Role::Tiny::does_role($thing, $role)
326 4 2 if ($info2->{'type'} eq 'Moose::Role' or $INC{'Moose.pm'} and Moose::Util::find_meta($thing))
330 1 3 if Moose::Util::does_role($thing, $role)
333 1 4 if ($info2->{'type'} eq 'Mouse::Role' or $INC{'Mouse.pm'} and Mouse::Util::find_meta($thing))
337 0 1 if Mouse::Util::does_role($thing, $role)