Branch Coverage

blib/lib/Fred/Fish/DBUG/ON.pm
Criterion Covered Total %
branch 416 626 66.4


line true false branch
201 37 43 if ($old_stack) { }
252 0 43 if ($] >= "5.008001" and $Fred::Fish::DBUG::ON::Config{'useithreads'})
255 0 0 if ($] == "5.01" and $Fred::Fish::DBUG::ON::Config{'ccname'} eq "gcc" and $Fred::Fish::DBUG::ON::Config{'gccversion'})
257 0 0 if $parts[0] > 4 or $parts[0] == 4 and $parts[1] >= 8
260 0 0 unless ($broken)
280 0 43 unless ($Fred::Fish::DBUG::ON::Config{'d_fork'})
281 0 0 unless $^O eq "MSWin32" or $^O eq "NetWare"
282 0 0 if $threads_possible == 0
283 0 0 unless $Fred::Fish::DBUG::ON::Config{'ccflags'} =~ /-DPERL_IMPLICIT_SYS/
296 0 43 if ($^O eq "MSWin32")
333 0 43 $threads_possible ? :
334 43 0 $fork_possible ? :
335 43 0 $color_supported ? :
336 43 0 $time_hires_flag ? :
342 43 0 if ($ENV{'PERL_DL_NONLAZY'}) { }
0 0 elsif ($ENV{'PERL_USE_UNSAFE_INC'}) { }
0 0 elsif ($ENV{'HARNESS_ACTIVE'}) { }
352 43 0 if ($make_test_flag)
367 2 41 unless ($dbug_global_vars{'dbug_leave_called'})
379 6 37 unless ($dbug_global_vars{'printed_exit_status'})
390 0 0 if ($dbug_global_vars{'keep'} and $dbug_global_vars{'file'})
392 0 0 if (ref $dbug_global_vars{'keep'} eq "CODE")
395 0 0 unless $keep
400 36 7 if ($dbug_global_vars{'can_close'})
406 0 43 if $toss_the_file
418 18211 0 unless $dbug_global_vars{'limit'}
422 0 0 if ($dbug_global_vars{'PID'} == $$)
423 0 0 $threads_possible ? :
424 0 0 if $tid == 0
427 0 0 if $parent == 1 and $dbug_global_vars{'limit'} == 1
428 0 0 if $parent == 0 and $dbug_global_vars{'limit'} == -1
447 378 8777 unless DBUG_ACTIVE()
451 8752 25 if (defined $dbug_fh) { }
452 0 8752 unless print $dbug_fh @_
469 111 0 if ($colors[0] eq "")
483 0 0 if (not defined $ln or $ln eq $term or $ln =~ /^\s*$/) { }
0 0 elsif ($ln eq $final) { }
505 0 25 unless ($f)
508 0 25 unless open REOPEN_FISH_FILE, ">>", $f
510 0 25 if ($dbug_global_vars{'allow_utf8'})
514 0 25 unless print REOPEN_FISH_FILE @_
532 14077 935 unless $dbug_global_vars{'multi'}
539 0 935 if $threads_possible
542 935 0 if ($fork_possible)
543 611 324 if ($dbug_global_vars{'PID'} == $$) { }
544 611 0 if $tid == -1
547 0 324 $id == 0 ? :
548 0 324 if $tid == 0
553 0 935 if ($tid != -1 and $fid != -1) { }
0 935 elsif ($tid != -1) { }
935 0 elsif ($fid != -1) { }
568 724 211 if $remove == 0
602 5607 46768 if ($c2 eq '(eval)') { }
611 10805 0 wantarray ? :
621 772 14 unless $dbug_global_vars{'elapsed'}
622 0 14 unless defined $start_clock
627 14 0 if ($time_hires_flag) { }
650 1 446 if defined $_[0] and $_[0] eq __PACKAGE__
669 834 118 if $by =~ /^$pkg/
676 55 392 if ($dbug_enter_flg and $by ne $dbug_global_vars{'main'})
680 89 7 if $by =~ /^$pkg/
688 2 53 if ($anon_flag)
689 0 2 if $by eq "Try::Tiny::try"
690 0 2 if $by eq "Try::Tiny::ScopeGuard::DESTROY"
691 0 2 if $by eq "Error::subs::try"
698 341 106 $no_prefix_flg ? :
700 0 447 if ($#c == -1) { }
733 0 894 unless $key
736 23 871 unless defined $val
739 0 894 if ref $val ne ref $dbug_global_vars{$key}
743 655 239 if ($func and ref $func eq "CODE")
877 0 38 ref $_[0] eq 'HASH' ? :
879 0 38 if ($dbug_global_vars{'on'})
887 1 37 if ($opts->{'off'})
898 2 35 if $opts->{'kill_end_trace'}
899 2 35 if $opts->{'who_called'}
900 8 29 if $opts->{'multi'}
901 0 37 if $opts->{'strip'}
902 1 36 if $opts->{'elapsed'}
903 0 37 if $opts->{'no_addresses'}
904 1 36 if $opts->{'allow_utf8'}
906 0 37 if ($opts->{'keep'})
907 0 0 if (ref $opts->{'keep'} eq 'CODE') { }
914 0 37 if ($opts->{'limit'})
915 0 0 $opts->{'limit'} > 0 ? :
918 1 36 if ($opts->{'delay'} and $opts->{'delay'} =~ /(^\d+$)|(\d+\.\d+$)/) { }
0 36 elsif ($opts->{'delay'}) { }
920 0 1 unless ($time_hires_flag)
921 0 0 if ($dbug_global_vars{'delay'} =~ s/[.]\d+$//)
932 0 37 unless defined $file
934 0 37 if (ref $file eq "GLOB")
935 0 0 if ($file == \*STDERR or $file == \*STDOUT)
947 0 37 if (ref $file ne "")
954 0 37 if $file eq ""
960 0 37 if (exists $opts->{'autoflush'} and not $opts->{'autoflush'})
966 0 37 if (-f $file)
968 0 0 if ($age < 1)
970 0 0 if ($age < 1)
972 0 0 if ($age < 1)
978 0 0 if ($opts->{'append'}) { }
986 0 37 unless open FISH_FILE, $mode, $file
988 37 0 if $flush
989 1 36 if ($dbug_global_vars{'allow_utf8'})
1004 0 37 if ($overwritten) { }
0 37 elsif ($mode eq '>>') { }
1011 0 0 $dbug_global_vars{'multi'} ? :
1033 0 62 if ($k eq 'chmod' and defined $opts->{'chmod'}) { }
1041 4 33 if ($opts_str eq '') { }
1049 0 37 if (defined $opts->{'chmod'}) { }
1055 1 36 if ($opts->{'autoopen'}) { }
1065 0 37 if ($opts->{'before'} and $#lst != -1)
1121 35 992 if ($func eq "(eval)")
1129 8 1019 if ($func =~ /::AUTOLOAD$/)
1132 0 8 if $dbug_global_vars{'strip'} and $aka =~ /::([^:]+)$/
1138 71 956 if ($dbug_global_vars{'who_called'} and $func ne $dbug_global_vars{'main'})
1140 15 56 if ($eval_flg or $func =~ /::END$/ or $func =~ /::BEGIN$/ or $func =~ /::UNITCHECK$/ or $func =~ /::CHECK$/ or $func =~ /::INIT$/ or $func =~ /::DESTROY$/) { }
3 53 elsif ($func =~ /::try [{][.]{3}[}]\s*$/ or $func =~ /::catch [{][.]{3}[}]\s*$/ or $func =~ /::finally [{][.]{3}[}]\s*$/) { }
1156 0 53 unless $line
1161 154 873 $func =~ /::END$/ ? :
1164 0 1027 if $dbug_global_vars{'strip'} and $func =~ /::([^:]+)$/
1167 948 79 if (DBUG_EXECUTE(1))
1179 19 1008 if $dbug_global_vars{'elapsed'}
1180 124 903 if $dbug_global_vars{'multi'}
1199 1369 648 if ($#args == -1) { }
104 544 elsif (DBUG_EXECUTE('args') == 0) { }
1203 0 104 if (exists $dbug_global_vars{'mask_func_call'})
1211 7 537 if (exists $dbug_global_vars{'mask_func_call'})
1213 1 6 if ($mask->{'ALL'})
1219 4 3 if ($mask->{'ARRAY'})
1221 5 4 if ($_ <= $#args)
1227 2 5 if ($mask->{'HASH'})
1230 3 15 if ($mask_flag) { }
1236 3 12 if exists $mask->{'HASH'}{$k}
1245 84 1188 if (ref $args[$_] eq "CODE")
1247 0 84 if $dbug_global_vars{'strip'} and $f =~ /::([^:]+)$/
1252 0 544 if ($dbug_global_vars{'no_addresses'})
1255 0 0 if (ref $args[$_] ne "")
1264 1272 0 defined $args[$_] ? :
1296 0 990 unless defined $block_name
1299 0 990 if $dbug_global_vars{'strip'} and $block_name =~ /::([^:]+)$/
1303 7 983 if ($dbug_global_vars{'who_called'})
1311 317 673 if (DBUG_EXECUTE(1))
1324 0 990 if $dbug_global_vars{'elapsed'}
1325 0 990 if $dbug_global_vars{'multi'}
1374 2964 12640 if ($tag =~ /^\d+$/ and defined $dbug_levels[$tag])
1375 0 2964 wantarray ? :
1386 1636 11004 if ($tag eq 'args') { }
704 10300 elsif ($utag eq 'ERROR') { }
20 10280 elsif ($utag eq 'STDOUT' or $utag eq 'STDERR') { }
144 10136 elsif ($utag eq 'WARN' or $utag eq 'WARNING') { }
136 10000 elsif ($utag eq 'DEBUG' or $utag eq 'DBUG') { }
206 9794 elsif ($utag eq 'INFO') { }
0 9794 elsif ($utag eq 'INTERNAL') { }
698 9096 elsif ($tag eq __PACKAGE__) { }
202 8894 elsif ($tag =~ /^$pkg::/) { }
1410 5758 6882 wantarray ? :
1421 9846 0 if ($dbug_global_vars{'filter_style'} >= 0) { }
1443 0 508 unless $level
1448 105 403 if ($_[0] and $_[0] =~ /^::[^:]/)
1475 6739 20 unless (defined $want_return)
1476 997 5742 unless ($fish_on)
1487 0 5762 if (not defined $fmt) { }
3243 2519 elsif ($#values == -1) { }
1491 0 3243 if (ref $fmt eq "CODE")
1493 0 0 if $dbug_global_vars{'strip'} and $f =~ /::([^:]+)$/
1499 0 8444 unless defined $_
1500 4 8440 if (ref $_ eq "CODE")
1502 0 4 if $dbug_global_vars{'strip'} and $f =~ /::([^:]+)$/
1513 31 5731 if $#lines == -1
1515 20 5742 if (defined $want_return) { }
1524 5758 4 if ($fish_on)
1534 101 5657 if ($dbug_global_vars{'who_called'})
1540 22 5736 if ($dbug_global_vars{'delay'})
1541 22 0 if ($time_hires_flag) { }
1558 22 5736 if ($flg and $dbug_global_vars{'delay'})
1598 27 361 if exists $func->{'AMASK'}
1603 386 2 unless ($all)
1604 1 385 if (exists $func->{'HMASK'} and $max > 0)
1605 0 1 $max % 2 == 0 ? :
1611 0 4 unless defined $key
1612 2 2 unless exists $func->{'HMASK'}{$key}
1621 50 902 if $all or $mask{$_}
1640 408 5 unless ($block->{'PAUSED'})
1659 85 328 unless (defined $fish_return)
1664 12 73 if defined $func and $func eq $called_by_special || $func eq $called_by_special2
1668 21 392 unless (DBUG_EXECUTE(1))
1669 0 21 exists $block->{'AMASK'} || exists $block->{'HMASK'} ? :
1670 16 5 if (not defined $fish_return) { }
0 5 elsif (DBUG_EXECUTE(2)) { }
4 1 elsif ($fish_return) { }
1687 388 4 if ($max != -1)
1688 202 186 $fish_return ? :
1696 353 39 $block->{'FUNC'} ? :
1701 388 4 _filter_on(2) ? :
1746 5 387 if $dbug_global_vars{'elapsed'}
1751 204 188 if ($fish_return) { }
137 51 elsif (defined $fish_return) { }
1776 8 12 unless (defined wantarray)
1780 8 4 if (wantarray)
1805 649 74 unless ($block->{'PAUSED'})
1808 628 21 if (DBUG_EXECUTE(1))
1810 449 179 $block->{'FUNC'} ? :
1873 33 46 if (wantarray)
1880 4 8 if ($scalar eq "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==" and exists $dbug_global_vars{'functions'}[-1]{'AMASK'})
1882 2 2 if ($$msk{$#_ + 0}) { }
2 0 elsif ($msk->{'0'}) { }
1905 31 15 unless (defined wantarray)
1909 19 12 unless defined $parent_wantarray
1912 8 4 if $parent_wantarray
1917 4 0 if (defined $scalar)
1918 1 3 if ($scalar eq '_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_') { }
1 2 elsif ($scalar eq '-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-') { }
1 1 elsif ($scalar eq '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==') { }
1927 0 4 if ($last_masked) { }
1940 15 0 if (defined $scalar)
1941 5 10 if (ref $scalar eq 'CODE') { }
3 7 elsif ($scalar eq '_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_') { }
3 4 elsif ($scalar eq '-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-') { }
2 2 elsif ($scalar eq '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==' and not $last_masked) { }
2 0 elsif ($scalar eq '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==' and $last_masked) { }
1986 37 2 if (DBUG_EXECUTE(1))
1991 37 0 if (defined $block) { }
1998 1 36 unless $block->{'FUNC'}
1999 1 36 if $dbug_global_vars{'elapsed'}
2024 2 41 if $dbug_global_vars{'no_end'}
2086 1352 8788 if $dbug_global_vars{'skip_eval_fix'}
2092 151 8637 $from_dbug_catch_flag ? :
2097 287 8331 if $b->{'EVAL'} < $eval_cnt
2098 6718 1613 if $eval_cnt == 0 and $b->{'EVAL'} == 0
2101 0 1613 if exists $b->{'MULTI'} and $b->{'MULTI'} ne _indent_multi(1)
2106 1400 213 if ($b->{'EVAL'} == $eval_cnt)
2107 1397 3 if $b->{'EVAL_LN'} == $eval_lns->[0]
2115 152 64 unless ($b->{'PAUSED'})
2118 152 0 if (DBUG_EXECUTE(1))
2120 74 78 $b->{'FUNC'} ? :
2147 2 43 if $dbug_global_vars{'pause'}
2197 8 34 if $#lst == -1
2204 0 61 unless defined $idx
2205 0 61 if $idx =~ /^\s*$/
2208 3 58 unless ($idx =~ /^-?\d+$/)
2215 2 56 if ($idx <= -1)
2225 33 1 if ($acnt > 0) { }
2230 1 33 if ($hcnt > 0) { }
2276 0 11 if $#args == -1
2282 0 16 unless defined $idx
2283 0 16 if $idx =~ /^\s*$/
2285 4 12 if ($idx =~ /^-\d+$/) { }
9 3 elsif ($idx =~ /^\d+$/) { }
2286 4 0 if ($idx == -1)
2303 11 0 if ($acnt + $hcnt + $all > 0)
2307 3 8 if $hcnt > 0
2309 4 7 if ($acnt > 0)
2369 84 0 if ($dbug_global_vars{'filter_style'} == 1) { }
2377 39 45 if ($level and $level =~ /^\d+$/)
2378 32 7 if (1 <= $level and $level <= 8) { }
7 0 elsif ($level == 99) { }
2384 38 1 if ($old_lvl != $new_lvl)
2385 0 38 $old_lvl == -1 ? :
2387 8 30 $old_lvl > $new_lvl ? :
2401 0 84 wantarray ? :
2420 0 0 unless defined $lvl and $lvl =~ /^\d+$/
2422 0 0 if (1 <= $lvl or $lvl <= 8) { }
0 0 elsif ($lvl == 99) { }
2433 0 0 $levels{$_} ? :
2434 0 0 if ($dbug_custom_levels[$_])
2436 0 0 if $sep eq ""
2446 0 0 if $c eq "Fred::Fish::DBUG::ON::DBUG_CUSTOM_FILTER_OFF"
2472 0 0 $dbug_custom_levels[$_] ? :
2474 0 0 if ($dbug_custom_levels[$_])
2476 0 0 if $sep eq ""
2515 0 21 if $color_supported == 0
2518 21 0 if ($level and $level =~ /^\d+$/)
2519 19 2 if (1 <= $level and $level <= 8 or $level == 99)
2527 19 2 if ($valid_level)
2532 0 47 unless defined $cm
2533 0 47 if $cm =~ /^\s*$/
2541 21 26 if ($@)
2552 0 21 if ($@)
2562 19 2 if ($valid_level)
2563 19 0 if ($color_str) { }
2582 0 8376 if $color_supported == 0
2583 156 8220 if $ENV{'ANSI_COLORS_DISABLED'}
2584 8037 183 unless defined $color_list[$level]
2610 18211 777 if ($dbug_global_vars{'on'} and not $dbug_global_vars{'pause'} and _limit_thread_check())
2612 0 18211 $dbug_global_vars{'screen'} ? :
2645 1718 9356 unless $active
2648 468 8888 unless _filter_on($tag)
2711 0 0 if $bool_expr
2719 0 0 if ($always_on) { }
0 0 elsif (DBUG_ACTIVE()) { }
2725 0 0 if ($asserted)
2731 0 0 unless ($dbug_global_vars{'screen'} and _filter_on($level))
2733 0 0 if $msg
2738 0 0 if $msg
2764 49 980 if $len > $max1
2776 861 168 if $tmp
2781 21 1008 if $len > $max2
2787 0 1029 if $len > $max1
2811 92 0 if ($callback)
2816 71 21 if (ref $callback eq 'CODE') { }
0 21 elsif ($callback =~ /^$pkg_name/) { }
2 19 elsif ($callback =~ /^(.+)::([^:]+)$/) { }
2821 0 71 if ($func =~ /^$pkg_name/)
2837 2 0 if ($pkg->can($name))
2852 5 14 if ($called_by and $called_by =~ /^(.+)::([^:]+)$/)
2854 5 0 if ($pkg->can($callback))
2861 14 5 unless ($func)
2863 14 0 if ($tmp)
2870 0 92 if ($use_warn and not $func)
2875 81 11 wantarray ? :
2932 0 9 if $cnt == -1 and defined $hint
2946 0 17 if $cnt == -1 and defined $hint
2972 0 0 if ($dbug_global_vars{'on'} and exists $dbug_global_vars{$key})