| line |
true |
false |
branch |
|
22
|
0 |
0 |
if $line =~ /\A[0-9]+\z/ |
|
24
|
0 |
0 |
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 |
|
52
|
0 |
0 |
unless @throws |
|
54
|
0 |
0 |
if ($sign eq 'b') { } |
|
55
|
0 |
0 |
if $offset < 0 |
|
56
|
0 |
0 |
if $offset > @throws |
|
66
|
0 |
0 |
if $sign eq '+' |
|
67
|
0 |
0 |
if $sign eq '-' |
|
68
|
0 |
0 |
if $sign eq '*' or $sign eq 'x' |
|
69
|
0 |
0 |
if ($sign eq '/') |
|
79
|
0 |
0 |
if $line =~ /\A[0-9]+\z/ |
|
81
|
0 |
0 |
unless $line =~ /
^ # beginning of line
(\d+)? # optional count in $1
[dD] # 'd' for dice
( # type of dice in $2:
\d+ # either one or more digits
| # or
% # a percent sign for d% = d100
| # pr
F # a F for a fudge dice
)
/x |
|
99
|
0 |
0 |
if ($type eq '%') { } |
|
|
0 |
0 |
elsif ($type eq 'F') { } |