line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
1443
|
use strict; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
151
|
|
2
|
3
|
|
|
3
|
|
21
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
253
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Games::Bowling::Scorecard::Frame::TenPinTenth; |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$Games::Bowling::Scorecard::Frame::TenPinTenth::VERSION = '0.105'; |
7
|
|
|
|
|
|
|
} |
8
|
3
|
|
|
3
|
|
2928
|
use parent qw(Games::Bowling::Scorecard::Frame); |
|
3
|
|
|
|
|
1303
|
|
|
3
|
|
|
|
|
19
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: ten pin's weird 10th frame |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub is_done { |
13
|
151
|
|
|
151
|
1
|
220
|
my ($self) = @_; |
14
|
|
|
|
|
|
|
|
15
|
151
|
|
|
|
|
577
|
my @balls = $self->balls; |
16
|
|
|
|
|
|
|
|
17
|
151
|
100
|
100
|
|
|
1374
|
return 1 if @balls == 3 or @balls == 2 and $balls[0] + $balls[1] < 10; |
|
|
|
66
|
|
|
|
|
18
|
126
|
|
|
|
|
597
|
return; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub is_pending { |
23
|
29
|
|
|
29
|
1
|
139
|
return 0; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub roll_ok { |
28
|
30
|
|
|
30
|
1
|
533
|
my ($self, $ball) = @_; |
29
|
|
|
|
|
|
|
|
30
|
30
|
|
|
|
|
48
|
eval { $self->SUPER::roll_ok($ball) }; |
|
30
|
|
|
|
|
112
|
|
31
|
|
|
|
|
|
|
|
32
|
30
|
100
|
|
|
|
537
|
if (my $error = $@) { |
33
|
12
|
100
|
|
|
|
63
|
return if $error =~ /would bring the frame above 10/; |
34
|
1
|
|
|
|
|
4
|
die $error; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
300; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |