EPL2/Command/P.pm

filter: Statementstmt 100% 30 / 30 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 95.2% 40 / 42 CC 3 SCAR 3.4
CC
3
Cov
94%
__ANON__
2.0
string
2.0
BEGIN
1.0
CRAP 1.4
« EPL2/Command/Q.pm ↑ Summary EPL2/Command.pm »
1 package EPL2::Command::P;
2 # ABSTRACT: P Command (Print)
3 2 $EPL2::Command::P::VERSION = '0.001';
4 3 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use MooseX::Method::Signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use EPL2::Types qw(Positive Natural);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 extends 'EPL2::Command';
11  
12 #Public Attributes
13 2 has number_sets => ( is => 'rw', isa => Positive, default => 1, );
14 2 has number_copies => ( is => 'rw', isa => Natural, default => 0, );
15  
16 #Methods
17 3 ▶method string ( Str :$delimiter = "\n" ) {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=2 SCAR=7.0
Subroutine string: called CC=2 SCAR=7.0
18 1 my $string = sprintf 'P%d', $self->number_sets;
19 1 ▶ $string .= ',' . $self->number_copies if ( $self->number_copies );
Branch: 2 branches
BranchTrueFalseTotal
if $self->number_copies 0 1 1
if $self->number_copies 0 1 1
20 1 return $string . $delimiter;
21 2 }
22  
23 2 __PACKAGE__->meta->make_immutable;
24  
25 2 1;
26  
27 __END__
« EPL2/Command/Q.pm ↑ Summary EPL2/Command.pm »