| 1 | 4 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 2 | 4 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||
| 4 | package Games::Bowling::Scorecard::Frame::TenPinTenth; | ||||||||||||||||||||||||||||||||||||||||||
| 5 | { | ||||||||||||||||||||||||||||||||||||||||||
| 6 | 4 | $Games::Bowling::Scorecard::Frame::TenPinTenth::VERSION = '0.105'; | |||||||||||||||||||||||||||||||||||||||||
| 7 | } | ||||||||||||||||||||||||||||||||||||||||||
| 8 | 4 | ▶ | use parent qw(Games::Bowling::Scorecard::Frame); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | # ABSTRACT: ten pin's weird 10th frame | ||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | sub is_done { | ||||||||||||||||||||||||||||||||||||||||||
| 13 | 151 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_done: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | 151 | my @balls = $self->balls; | |||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | 151 | ▶ | return 1 if @balls == 3 or @balls == 2 and $balls[0] + $balls[1] < 10; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%6/6
@balls == 3 or @balls == 2 and $balls[0] + $balls[1] < 10
@balls == 2 and $balls[0] + $balls[1] < 10
MC/DC100%3/3
@balls == 3 or @balls == 2 and $balls[0] + $balls[1] < 10
@balls == 3
@balls == 2
$balls[0] + $balls[1] < 10
Truth table100%4/4
A or B and C
A= @balls == 3B= @balls == 2C= $balls[0] + $balls[1] < 10
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | 126 | return; | |||||||||||||||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | sub is_pending { | ||||||||||||||||||||||||||||||||||||||||||
| 23 | 29 | ▶ | return 0; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_pending: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||
| 27 | sub roll_ok { | ||||||||||||||||||||||||||||||||||||||||||
| 28 | 30 | ▶ | my ($self, $ball) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
roll_ok: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | 30 | eval { $self->SUPER::roll_ok($ball) }; | |||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | 30 | ▶ | if (my $error = $@) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 33 | 12 | ▶ | return if $error =~ /would bring the frame above 10/; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 34 | 1 | die $error; | |||||||||||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||
| 38 | 4 | 300; | |||||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||||||
| 40 | __END__ | ||||||||||||||||||||||||||||||||||||||||||