Branch Coverage

blib/lib/Games/Dice.pm
Criterion Covered Total %
branch 22 30 73.3


line true false branch
20 0 12 unless $line =~ m[ ^ # beginning of line ( # dice string in $1 (?\d+)? # optional count [dD] # 'd' for dice (? # type of dice: \d+ # either one or more digits | # or % # a percent sign for d% = d100 | # pr F # a F for a fudge dice ) ) (?: # grouping-only parens (?[-+xX*/bB]) # a + - * / b(est) in $2 (?\d+) # an offset in $3 )? # both of those last are optional \s* # possibly some trailing space (like \n) $ ]x
58 1 12 if $line =~ /\A[0-9]+\z/
61 0 12 unless $pr
64 0 12 unless @throws
68 2 10 if ($sign eq 'b') { }
69 0 2 if $offset < 0
70 1 1 if $offset > @throws
81 1 11 if $sign eq "+"
82 1 11 if $sign eq "-"
83 2 10 if $sign eq "*" or $sign eq "x"
84 1 11 if ($sign eq "/")
96 1 11 if ($type eq '%') { }
2 9 elsif ($type eq 'F') { }
113 0 0 if $line =~ /\A[0-9]+\z/
116 0 0 unless $pr