Branch Coverage

blib/lib/Fatal.pm
Criterion Covered Total %
branch 178 214 83.1


line true false branch
363 2 141 unless @_
368 130 11 if ($_[0] eq ':lexical')
377 2 128 if ($class ne 'autodie' and not $class->isa('autodie'))
378 2 0 if ($class eq 'Fatal') { }
410 47 83 if (@_ == 0)
415 1 129 if (grep {$_ eq ':void';} @_)
420 1 139 if (grep {$_ eq ':lexical';} @_)
448 2 2999 if ($func eq ':void') { }
3 2996 elsif ($func eq '!') { }
465 3 2993 if (substr($func, 0, 1) eq '!')
478 2996 0 unless $sub =~ /::/
484 1 2995 if (not $lexical and $^H{$NO_PACKAGE}{$sub})
504 2936 56 if $lexical
510 128 7 if ($lexical)
548 0 11 if ($_[0] ne ':lexical')
560 6 5 @_ ? :
566 330 0 unless $sub =~ /::/
571 1 329 if (exists $Package_Fatal{$sub})
602 139 18 if (@args < 2)
605 0 139 unless @args
608 76 63 unless exists $TAGS{$args[0]}
628 13 48 if (exists $TAGS{$a}) { }
660 36 12 if ($letter ne ':' and $a ne '!')
661 2 34 if $seen{$a}++
662 2 32 if ($letter eq '!' and $seen{substr $a, 1}++)
698 60 346 if (my $cached = $tag_cache{$tag})
702 1 345 unless (exists $TAGS{$tag})
711 4 341 if (@to_process == 1 and substr($to_process[0], 0, 1) eq ':')
726 311 1825 if (substr($item, 0, 1) eq ':') { }
733 1825 0 unless $seen{$subname}++
769 106 66 if (@argvs == 1) { }
785 46 133 if (@argv and $argv[-1] =~ /[#\@]_/)
840 0 287 if ($void and not $back_compat)
851 81 206 if ($back_compat)
857 0 81 if ($call eq 'CORE::system')
865 3 78 if ($void) { }
866 2 1 $core ? :
870 77 1 $core ? :
885 164 42 $core ? :
894 164 42 if ($core) { }
920 2 204 if ($call eq 'CORE::system')
976 1 203 if ($call eq 'CORE::flock')
994 0 1 if ($try_EAGAIN)
1026 7 196 if (exists $Returns_num_things_changed{$call})
1071 25 171 if ($hints and (ref $$hints{'list'} || '') eq 'CODE') { }
6 165 elsif ($hints) { }
0 165 elsif ($hints) { }
1116 26 170 if ($hints and (ref $$hints{'scalar'} || '') eq 'CODE') { }
5 165 elsif ($hints) { }
0 165 elsif ($hints) { }
1140 128 37 $use_defined_or ? :
1173 2995 0 if (index($sub, '::') == -1) { }
1175 0 2995 if (substr($name, 0, 1) eq '&')
1186 58 2937 unless ($lexical)
1194 0 2995 if $Debug
1195 1 2994 unless $name =~ /^\w+$/
1197 354 2640 if (defined &$sub) { }
0 2640 elsif ($sub eq $ini and not $sub =~ /^CORE::GLOBAL::/) { }
3 2637 elsif ($name eq 'system') { }
1 2636 elsif ($name eq 'exec') { }
1210 1 353 if ($Package_Fatal{$sub} and exists $CORE_prototype_cache{"CORE::$name"}) { }
1232 308 45 if (exists $Is_fatalised_sub{$sref})
1242 0 308 if (defined $s) { }
1256 45 308 unless ($core)
1267 1 44 if ($insist and not $hints)
1303 0 3 if ($E)
1307 0 3 if ($IPC::System::Simple::VERSION < 0.12)
1327 1087 1549 if (exists $CORE_prototype_cache{$call}) { }
1336 0 1549 if $E
1337 1 1548 unless defined $proto
1354 2936 56 if ($lexical) { }
1358 2 54 if $void
1361 0 2992 if (my $subref = $$cache{$cache_type})
1370 1371 1621 if ($core and exists $reusable_builtins{$call})
1374 0 1371 if (not $lexical and defined $code)
1380 98 0 unless ($lexical and $core or defined $code)
1383 23 75 if exists $reusable_builtins{$call}
1387 23 75 unless (defined $wrapper_pkg)
1406 2936 56 if ($lexical)
1441 39 54 unless ($class_loaded{$exception_class})
1442 1 38 if ($exception_class =~ /[^\w:']/)
1464 1 37 if $E
1495 0 0 if $caller eq $filename
1501 148 97 if ($caller eq $filename)
1504 91 57 unless (defined $wrapped_sub)
1507 0 91 if substr($call, 0, 6) ne 'CORE::'
1515 33 58 if (exists $reusable_builtins{$call})
1519 73 18 unless (defined $code)
1531 15 58 unless (defined $wrapper_pkg)
1546 93 4 if defined $orig_sub
1573 2 2 if exists $reusable_builtins{$call}
1576 4 0 unless ($orig_sub)
1599 2890 46 if (defined $proto)
1613 124 47 if (defined $proto) { }
1624 56 115 unless ($lexical)
1632 1 170 if $call eq 'CORE::exec'
1637 0 171 if $Debug
1652 133 38 if (defined $wrapper_pkg) { }
1653 3 6 if (@_ == 1) { }
0 4 elsif (@_ == 2) { }
4 0 elsif (@_ >= 3) { }
1655 0 6 if (@_ == 0) { }
5 1 elsif (@_ == 1) { }
1 0 if (@_ == 1) { }
0 0 elsif (@_ == 2) { }
1661 0 171 unless ($code)
1662 0 0 $core ? :