Dominoes/Play.pm

filter: Statementstmt 82.6% 19 / 23 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 2 / 2 totaltotal 76.4% 26 / 34 CC 3 SCAR 10.1
CC
3
Cov
74%
stringify
6.0
is_opening
2.1
BEGIN
1.0
CRAP 2.8
« Dominoes/Error.pm ↑ Summary Dominoes/Hand.pm »
1 package Game::Dominoes::Play;
2  
3 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 15 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 15 ▶use Object::Proto::Sugar -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 15 our $VERSION = '0.03';
9  
10 has tile => (
11 is => 'ro',
12 isa => Object
13 15 );
14  
15 has arm => (
16 is => 'ro',
17 isa => Str
18 15 );
19  
20 has matched => (
21 is => 'ro',
22 isa => Int
23 15 );
24  
25 has showing => (
26 is => 'ro',
27 isa => Int
28 15 );
29  
30 has spinner => (
31 is => 'ro',
32 isa => Bool,
33 default => 0
34 15 );
35  
36 has ends => (
37 is => 'ro',
38 isa => ArrayRef,
39 default => []
40 15 );
41  
42 has points => (
43 is => 'rw',
44 isa => Int
45 15 );
46  
47 1 ▶sub is_opening {
Subroutine is_opening: called CC=2 SCAR=7.6
Pod documented
48 1 ▶ return defined $_[0]->matched ? 0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0]->matched ? : 0 1 1
49 }
50  
51 0 ▶sub stringify {
Subroutine stringify: not called CC=2 SCAR=17.9
Pod documented
52 0 my ($self) = @_;
53 0 my $text = $self->tile->stringify . '@' . $self->arm;
54 0 ▶ $text .= '*' if $self->spinner;
Branch: 1 branch
BranchTrueFalseTotal
if $self->spinner 0 0 0
55 0 return $text;
56 }
57  
58 15 1;
59  
60 __END__
« Dominoes/Error.pm ↑ Summary Dominoes/Hand.pm »