Branch Coverage

blib/lib/Moo/_Utils.pm
Criterion Covered Total %
branch 54 68 79.4


line true false branch
17 4 82 unless $su = $INC{'Sub/Util.pm'} && defined &Sub::Util::set_subname or $sn = $INC{'Sub/Name.pm'} or $su = eval {
21 2 2 $sn ? :
224 4 $su ? :
22 226 2 $su || $sn ? :
24 0 228 "$]" < 5.009 ? :
27 0 228 "$]" < 5.011 && !("$]" >= 5.009004 && "$]" < 5.010001) ? :
71 2 66 if ref $names[0] eq 'ARRAY'
76 60 8 if ($INC{'Sub/Defer.pm'})
79 60 2 if (my $to_modify = $target->can($name))
88 6 60 if (@tracked)
105 0 0 if @{$_[0];}
113 68 106 unless (eval {
125 2 604 unless $module =~ /\A(?!\d)\w+(?:::\w+)*\z/
129 528 76 if $INC{$file}
132 12 64 unless defined $e
135 4 60 unless $e =~ /\ACan't locate \Q$file\E /
142 48 12 if grep exists(&{"${module}::$_";}), grep((!/::\z/), keys %$stash)
144 2 10 if $INC{'Moose.pm'} and Class::MOP::class_of($module) or 'Mouse::Util'->can('find_meta') and Mouse::Util::find_meta($module)
154 2 98 if exists $MAYBE_LOADED{$module}
158 94 4 if (not defined $e) { }
2 2 elsif (not $e =~ /\ACan't locate \Q$file\E /) { }
170 228 0 if "$]" >= 5.009005
172 228 0 if (defined &mro::get_linear_isa) { }
179 0 0 unless eval qq[sub _linear_isa(\$;\$) {\n my \$class = shift;\n my \$type = shift || exists \$Class::C3::MRO{\$class} ? 'c3' : 'dfs';\n\n if (\$type eq 'c3') {\n require Class::C3;\n return [Class::C3::calculateMRO(\$class)];\n }\n\n my \@check = (\$class);\n my \@lin;\n\n my %found;\n while (defined(my \$check = shift \@check)) {\n push \@lin, \$check;\n no strict 'refs';\n unshift \@check, grep !\$found{\$_}++, \@{"\$check\\::ISA"};\n }\n\n return \\\@lin;\n}\n\n1;\n]
205 0 0 if defined $e
210 0 0 _maybe_load_module('Devel::GlobalDestruction::XS') ? :
228 0 "$]" >= 5.014 ? :
217 0 228 unless eval "sub _in_global_destruction () { $gd_code }; 1"
229 24 5758 if (*{$glob;}{'CODE'}) { }
241 5772 144 if @_ > 2
248 228 310 unless my $exports = $EXPORTS{$target}
251 22 288 unless $names
261 2282 22 if $g and defined &$g
277 336 112 unless defined *{$old;}{$type}