blib/lib/DTL/Fast/Filter.pm

filter: Statementstmt 92.0% 23 / 25 Branchbran 50.0% 1 / 2 Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 3 totaltotal 71.7% 33 / 46 SCAR 14.1
CC
4
Cov
81%
new
4.5
filter
2.0
BEGIN
1.0
CRAP 4.1
« blib/lib/DTL/Fast/Filter/Random.pm ↑ Summary blib/lib/DTL/Fast/Filter/Center.pm »
1 package DTL::Fast::Filter;
2 69 ▶use strict; use utf8; use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3 69 ▶use parent 'DTL::Fast::Entity';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 69 ▶use DTL::Fast::Template;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub new
8 {
9 513 ▶ my( $proto, $parameter, %kwargs) = @_;
Subroutine new: called CC=4 SCAR=15.0
Pod undocumented
10
11 513 ▶ $proto = ref $proto || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
05130
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
12
13 513 ▶ $kwargs{'parameter'} = $parameter // [];
Condition50%1/2
$parameter // []
l!l
5130
MC/DC0%0/1
$parameter // []
$parameter
Truth table50%1/2
A
A= $parameter
Aresult
11
00
14
15 die $proto->get_parse_error("Parameter must be an ARRAY reference")
16 513 ▶ if ref $kwargs{'parameter'} ne 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $kwargs{"parameter"} ne "ARRAY" 0 513 513
17  
18 513 my $self = $proto->SUPER::new(%kwargs);
19
20 513 return $self->parse_parameters();
21 }
22  
23 124 ▶sub parse_parameters{return shift;}
Subroutine parse_parameters: called CC=1 SCAR=0.0
Pod undocumented
24  
25 sub filter
26 {
27 0 ▶ my ($self) = @_;
Subroutine filter: not called CC=1 SCAR=6.9
Pod undocumented
28 0 die sprintf( "filter was not overriden in a subclass %s", ref $self );
29 }
30  
31 69 1;
« blib/lib/DTL/Fast/Filter/Random.pm ↑ Summary blib/lib/DTL/Fast/Filter/Center.pm »