Branch Coverage

blib/lib/Role/Hooks.pm
Criterion Covered Total %
branch 65 122 53.2


line true false branch
17 0 9 $ENV{'PERL_ROLE_HOOKS_DEBUG'} ? :
25 0 0 @args ? :
31 0 0 @args ? :
43 46 19 if ($INC{'Role/Tiny.pm'} and "Role::Tiny"->can("is_role") and "Role::Tiny"->is_role($target))
50 0 0 if ($INC{'Role/Tiny.pm'} and not "Role::Tiny"->can("is_role") and $Role::Tiny::INFO{$target})
56 26 4 if ($INC{'Moose/Meta/Role.pm'} and do {
62 0 0 if ($INC{'Mouse/Meta/Role.pm'} and do {
68 0 23 if ($INC{'Role/Basic.pm'} and eval {
75 13 10 if (defined $UM and $UM eq "Mite::Role")
84 1 19 unless @callbacks
85 0 19 unless $me->is_role($target)
93 1 18 unless @callbacks
94 0 18 unless $me->is_role($target)
103 3 3 unless @callbacks
104 0 3 unless $me->is_role($target) eq "Role::Tiny" or $target->isa("Moo::Object")
121 27 13 if ($INC{'Role/Tiny.pm'})
124 21 19 if ($INC{'Moo/Role.pm'} or $INC{'Moo.pm'})
127 19 21 if ($INC{'Moose/Role.pm'} or $INC{'Moose.pm'})
130 0 40 if ($INC{'Mouse/Role.pm'} or $INC{'Mouse.pm'})
133 0 40 if ($INC{'Role/Basic.pm'})
138 6 34 if (defined $is_role and $is_role eq "Mite::Role")
146 3 0 if ($INC{'Moo/Role.pm'} or $INC{'Moo.pm'})
153 0 6 if $patched{'Role::Tiny'}
172 2 6 unless $CALLBACKS_BEFORE_APPLY{$role}
182 2 6 unless $CALLBACKS_AFTER_APPLY{$role}
186 4 4 if (my $is_role = $me->is_role($to))
188 1 3 unless $CALLBACKS_BEFORE_APPLY{$role}
189 1 3 unless $CALLBACKS_AFTER_APPLY{$role}
190 4 0 if ($is_role eq "Role::Tiny" or $to->isa("Moo::Object"))
191 3 1 unless $CALLBACKS_AFTER_INFLATE{$role}
203 0 4 if $patched{'Moo::Role'}
228 0 1 if $patched_inflation{'Moo::Role'}
243 0 4 unless $CALLBACKS_AFTER_INFLATE{$name}
245 1 3 if $already{"$name|$cb"}++
255 0 4 if $patched{'Moose::Role'}
268 0 4 unless $CALLBACKS_BEFORE_APPLY{$role}
276 0 4 unless $CALLBACKS_AFTER_APPLY{$role}
281 2 2 if ($me->is_role($to))
283 0 2 unless $CALLBACKS_BEFORE_APPLY{$role}
284 0 2 unless $CALLBACKS_AFTER_APPLY{$role}
294 0 0 if $patched{'Mouse::Role'}
307 0 0 unless $CALLBACKS_BEFORE_APPLY{$role}
315 0 0 unless $CALLBACKS_AFTER_APPLY{$role}
320 0 0 if ($me->is_role($to))
322 0 0 unless $CALLBACKS_BEFORE_APPLY{$role}
323 0 0 unless $CALLBACKS_AFTER_APPLY{$role}
333 0 0 if $patched{'Role::Basic'}
339 0 0 unless $Role::Basic::VERSION =~ /^0\.(?:0[7-9]|1[0-3])/
347 0 0 unless $CALLBACKS_BEFORE_APPLY{$role}
355 0 0 unless $CALLBACKS_AFTER_APPLY{$role}
360 0 0 if ($me->is_role($to))
362 0 0 unless $CALLBACKS_BEFORE_APPLY{$role}
363 0 0 unless $CALLBACKS_AFTER_APPLY{$role}
373 0 2 if $ENV{'MITE_COMPILE'}
378 2 1 unless ($indirect)
380 0 2 unless $CALLBACKS_BEFORE_APPLY{$role}
386 2 1 unless ($indirect)
388 0 2 unless $CALLBACKS_AFTER_APPLY{$role}
394 1 2 if (defined $to_type and $to_type eq "Mite::Role")
396 0 1 unless $CALLBACKS_BEFORE_APPLY{$role}
397 0 1 unless $CALLBACKS_AFTER_APPLY{$role}