Branch Coverage

blib/lib/Mite/Shim.pm
Criterion Covered Total %
branch 55 68 80.8


line true false branch
38 43 837 if (@args)
43 98 0 defined $_ ? :
0 98 ref $_ ? :
58 259 2 unless $_[0][0]
68 6 0 if (ref $ref eq "ARRAY")
73 0 0 if (ref $ref eq "HASH")
94 184 1763 if defined $Mite::COMPILING
102 111 183 if (_is_compiling()) { }
114 0 183 unless (-e $mite_file)
127 283 11 if not $arg{'-unclean'}
134 1 1 if ($INC{'Role/Hooks.pm'})
138 1 1 if ($cb_before)
139 1 0 unless $cb_before->{$role}
143 1 1 unless $info->{'modifiers'}
149 1 1 if ($cb_after)
150 0 1 unless $cb_after->{$role}
160 1 852 ref $_[0] ? :
161 2 851 if ($INC{'Role/Tiny.pm'} and 'Role::Tiny'->is_role($role)) { }
175 4 5813 if (@_ % 2)
177 1 3 'CODE' eq ref $default ? :
183 319 5498 ref $names ? :
186 1455 5157 if "CODE" eq ref($code = $spec{'default'})
188 1132 5480 if "CODE" eq ref($code = $spec{'builder'})
190 109 6503 if "CODE" eq ref($code = $spec{'trigger'})
192 1 6611 if "CODE" eq ref($code = $spec{'clone'})
203 2662 0 if $orig
209 1929 2511 ref $_ ? :
218 451 497 if ($kind eq "role")
226 0 497 unless eval " package $caller;\n no warnings 'redefine';\n sub $name {\n \$coderef->( \@_ );\n \$orig->( \@_ );\n }\n 1;\n"
244 0 1 if ($kind eq "role")
252 0 1 unless eval " package $caller;\n no warnings 'redefine';\n sub $name {\n my \@r;\n if ( wantarray ) {\n \@r = \$orig->( \@_ );\n }\n elsif ( defined wantarray ) {\n \@r = scalar \$orig->( \@_ );\n }\n else {\n \$orig->( \@_ );\n 1;\n }\n \$coderef->( \@_ );\n wantarray ? \@r : \$r[0];\n }\n 1;\n"
0 1 if (wantarray) { }
281 1325 2163 if ($kind eq "role")
289 1 2164 unless eval " package $caller;\n no warnings 'redefine';\n sub $name {\n \$coderef->( \$orig, \@_ );\n }\n 1;\n"