| 1 | package Perl::Analysis::Static::Filter; | ||||||||||
| 2 | { | ||||||||||
| 3 | 4 | $Perl::Analysis::Static::Filter::VERSION = '0.004'; # TRIAL | |||||||||
| 4 | } | ||||||||||
| 5 | # ABSTRACT: decide if we asked for an element | ||||||||||
| 6 | |||||||||||
| 7 | |||||||||||
| 8 | 4 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 4 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 4 | ▶ | use English qw( -no_match_vars ); # Avoids regex performance penalty | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | 3 | ▶ | sub set_arguments { | ||||||||
|
Subroutine
set_arguments: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 14 | 3 | my ($self, $arguments)=@_; | |||||||||
| 15 | |||||||||||
| 16 | 3 | my @args=split(/:/, $arguments); | |||||||||
| 17 | 3 | $self->_set_arguments(\@args); | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | |||||||||||
| 21 | 5 | ▶ | sub filter { | ||||||||
|
Subroutine
filter: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 22 | 5 | my ( $self, $elements ) = @_; | |||||||||
| 23 | |||||||||||
| 24 | 5 | my @e = grep { $self->_filter($_) } @$elements; | |||||||||
| 25 | 5 | ▶ | return unless @e; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 5 | return \@e; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 0 | ▶ | sub _filter { | ||||||||
|
Subroutine
_filter: not called CC=1 SCAR=6.9
| |||||||||||
| 30 | 0 | my ( $self, $element ) = @_; | |||||||||
| 31 | 0 | die 'implement me'; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 0 | ▶ | sub _set_arguments { | ||||||||
|
Subroutine
_set_arguments: not called CC=1 SCAR=6.9
| |||||||||||
| 35 | 0 | my ( $self, $arguments) = @_; | |||||||||
| 36 | 0 | die 'implement me'; | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 4 | 1; | |||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||