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
)
)
(?: # 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 |
50
|
0 |
0 |
unless @throws |
52
|
0 |
0 |
if ($sign eq 'b') { } |
53
|
0 |
0 |
if $offset < 0 |
54
|
0 |
0 |
if $offset > @throws |
64
|
0 |
0 |
if $sign eq '+' |
65
|
0 |
0 |
if $sign eq '-' |
66
|
0 |
0 |
if $sign eq '*' or $sign eq 'x' |
67
|
0 |
0 |
if ($sign eq '/') |
77
|
0 |
0 |
if $line =~ /\A[0-9]+\z/ |
79
|
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
)
/x |
93
|
0 |
0 |
if $type eq '%' |