Branch Coverage

blib/lib/Games/Baseball/Scorecard.pm
Criterion Covered Total %
branch 36 308 11.6


line true false branch
190 1 0 unless file_name_is_absolute($dir)
192 0 1 unless -e $dir
203 0 2 unless (open $fh, '>', catfile($dir, "$basewhich.tex"))
213 0 2 unless (open $fh, '>', catfile($dir, "$basewhich.mp"))
223 1 1 unless defined $$opts{'color'}[0]
224 1 1 unless defined $$opts{'color'}[1]
225 1 1 unless defined $$opts{'color'}[2]
254 0 1 unless (open $fhd, '>', catfile($dir, "$base.tex"))
268 1 1 if /away/
269 1 1 if /home/
286 0 0 if defined $level
355 0 1 if $$data{'home'}{'starter'}
358 0 1 if $$data{'away'}{'starter'}
393 0 7 unless (chdir $$self{'dir'})
397 0 7 $abs ? :
398 0 7 if $$self{'debug'} > 1
399 0 7 if $$self{'debug'}
403 0 7 if ($$self{'debug'} > 1)
404 0 0 if $output
427 2 0 if ($$self{'curr'}{'fh'})
449 0 0 unless ($file)
454 0 0 if $OPEN
467 8 0 if ($which) { }
470 4 4 $which eq 'home' ? :
504 0 0 if ($stats)
522 0 0 unless $$self{'curr'}{'inn'} == 1
547 0 0 if $$self{'curr'}{'ab'} > 9
563 0 0 if delete $$self{'_inn_new'}
566 0 0 if ($$self{'curr'}{'lineupnew'}[$$self{'curr'}{'ab'}])
571 0 0 if (delete $$self{'curr'}{'pitchernew'})
609 0 0 if ($$lineup[$order])
611 0 0 if ($rep2 > 3)
613 0 0 if ($rep2 > 6)
626 0 0 if ($$self{'curr'}{'stats'}{'batter'} and $$self{'curr'}{'stats'}{'batter'} eq $curr_batter)
635 0 0 if $xtra
637 0 0 $xtra ? :
642 0 0 if (not $rep2 or $rep2 <= 6)
643 0 0 if ($xtra) { }
686 0 0 if (@$lineup)
688 0 0 if ($rep2 > 10) { }
0 0 elsif ($rep2 > 5) { }
701 0 0 if ($$self{'other'}{'lefties'})
702 0 0 grep({$_ == $number;} @{$$self{'other'}{'lefties'};}) ? :
714 0 0 if $lr
815 0 0 if ($game =~ /\n__INIT__\n/)
819 0 0 if $l =~ /^__INIT__$/
822 0 0 if ($w[0] =~ /^(?:date|temp|at|att|scorer|wind)$/) { }
0 0 elsif ($w[0] =~ /^(home|away)$/) { }
831 0 0 if ($w2[0] eq 'starter') { }
0 0 elsif ($w2[0] eq 'lineup') { }
837 0 0 unless ($w3[0] =~ /^\d/)
853 0 0 if $l =~ /^__GAME__$/
858 0 0 if ($m eq 'ha')
864 0 0 unless $m
866 0 0 if $m eq 'to'
867 0 0 if $m eq 'r'
868 0 0 if $m eq '->'
869 0 0 if $m eq 'p'
870 0 0 if ($m eq 'pitches')
874 0 0 if ($m =~ /^(i?bb|hp|fc)$/i)
879 0 0 unless ($self->can($m))
886 0 0 if $ha
908 0 0 if (/s/i or /f/i and $s < 2) { }
0 0 elsif (/f/i) { }
0 0 elsif (/b/i) { }
922 0 0 if $num > 3
931 0 0 if $num > 2
940 0 0 unless $num > 4
952 0 0 if $strike
986 0 0 if ($bases eq 'U') { }
0 0 elsif ($bases == 4) { }
1003 0 0 $bases == 4 ? :
1004 0 0 lc $where eq 'r' ? :
0 0 lc $where eq 'rc' ? :
0 0 lc $where eq 'cr' ? :
0 0 lc $where eq 'cl' ? :
0 0 lc $where eq 'lc' ? :
0 0 lc $where eq 'l' ? :
0 0 lc $where eq 'ir' ? :
0 0 lc $where eq 'ic' ? :
0 0 lc $where eq 'il' ? :
1016 0 0 if $loc
1017 0 0 if $label
1037 0 0 if ($label =~ /^i?bb$/i) { }
0 0 elsif ($label =~ /^hb?p/i) { }
0 0 elsif (uc $label eq 'K') { }
1052 0 0 if ($label =~ /^(?:hb?p|i?bb)$/i) { }
0 0 elsif ($label =~ /^(?:SAC|SF)/i) { }
1063 0 0 if $bases == 4
1065 0 0 $bases == 2 ? :
0 0 $bases == 3 ? :
0 0 $bases == 4 ? :
1070 0 0 $label eq 1 ? :
0 0 $label eq 2 ? :
0 0 $label eq 3 ? :
0 0 $label eq 4 ? :
0 0 $label =~ /^hb?p/i ? :
0 0 $label =~ /^i?bb$/i ? :
1078 0 0 if (lc $label eq 'ibb') { }
0 0 elsif ($circle) { }
0 0 elsif ($label) { }
1094 0 0 if ($base)
1118 0 0 if ($label =~ /^!?K/i) { }
0 0 elsif ($label =~ /^SAC/i) { }
0 0 elsif ($label =~ /^SF/i) { }
0 0 elsif ($label =~ /^DP/i) { }
1134 0 0 if (uc $label eq '!K') { }
0 0 elsif ($label) { }
1146 0 0 unless ($num)
1148 0 0 unless $$self{'out'}[$_]
1152 0 0 unless $num
1157 0 0 if ($pitcher) { }
1197 0 0 if $label =~ /^CS/i
1201 0 0 $base2 == 4 ? :
1202 0 0 $base2 > $base1 + 1 ? :
1233 0 0 if (uc $base2 eq 'U')
1239 0 0 if $label
1241 0 0 if $base2 == 4
1242 0 0 if $base2 == 4 and not $unearned
1244 0 0 if ($label and $label =~ /^SB/i)
1393 0 0 $big ? :
1396 0 0 $base == 2 ? :
0 0 $base == 3 ? :
0 0 $base == 4 ? :
1414 0 0 $big ? :
1417 0 0 $base == 2 ? :
0 0 $base == 3 ? :
0 0 $base == 4 ? :
1483 0 0 if $$self{'_totals'}
1515 0 0 unless $$lineup[$i]
1522 0 0 if $j > 2
1525 0 0 if $j
1547 0 0 $j < 5 ? :
0 0 if $j
1550 0 0 $j < 5 ? :
1558 0 0 if $wls
1601 0 0 unless $_
1607 0 0 unless $_
1666 2 0 if $info
1672 2 0 if $info
1678 2 0 if $info
1684 2 0 if $info
1690 2 0 if $info
1696 2 0 if $info
1702 2 0 if $info
1711 0 0 $num == 2 ? :
0 0 $num == 3 ? :
0 0 $num == 4 ? :
1719 0 0 $num == 2 ? :
0 0 $num == 3 ? :
0 0 $num == 4 ? :
1734 16 0 defined $y && length $y ? :
1742 0 16 unless (defined $string and length $string)
1747 16 0 unless ($lit)