| 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
| |||||||||||
| 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
| |||||||||||
| 21 | |||||||||||
| 22 | 37 | ▶ | $self->parent->add_cost( $self->cost ) if $self->has_parent; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | 37 | return; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 1 | __PACKAGE__ -> meta -> make_immutable; | |||||||||
| 27 | |||||||||||
| 28 | 1 | 1; | |||||||||