blib/lib/Dallycot/Processor/PP.pm

filter: Statementstmt 100% 16 / 16 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 2 totaltotal 82.1% 23 / 28 CC 4 SCAR 7.9
CC
4
Cov
86%
DEMOLISH
3.1
add_cost
2.0
BEGIN
1.0
CRAP 2.2
« blib/lib/Dallycot/Value.pm ↑ Summary blib/lib/Dallycot/Util.pm »
1 package Dallycot::Processor::PP;
2 1 our $AUTHORITY = 'cpan:JSMITH';
3  
4 # ABSTRACT: Pure Perl implementation of Processor routines
5  
6 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub add_cost {
10 171 ▶ my ( $self, $delta ) = @_;
Subroutine add_cost: called CC=2 SCAR=7.1
Pod undocumented
11  
12 171 ▶ return 0 if $self->ignore_cost;
Branch: 1 branch
BranchTrueFalseTotal
if $self->ignore_cost 0 171 171
13  
14 171 return $self->_cost( $self->cost + $delta );
15 }
16  
17 sub DEMOLISH {
18 37 ▶ my ( $self, $flag ) = @_;
Subroutine DEMOLISH: called CC=3 SCAR=11.4
Pod undocumented
19  
20 37 ▶ return if $flag;
Branch: 1 branch
BranchTrueFalseTotal
if $flag 0 37 37
21  
22 37 ▶ $self->parent->add_cost( $self->cost ) if $self->has_parent;
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_parent 37 0 37
23 37 return;
24 }
25  
26 1 __PACKAGE__ -> meta -> make_immutable;
27  
28 1 1;
« blib/lib/Dallycot/Value.pm ↑ Summary blib/lib/Dallycot/Util.pm »