Enbld/Target/Attribute/CommandTest.pm

filter: Statementstmt 82.6% 19 / 23 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 74.2% 26 / 35 SCAR 11.5
CC
3
Cov
74%
initialize
3.9
BEGIN
1.0
BEGIN
1.0
CRAP 3.2
« Enbld/Target/Attribute/CommandMake.pm ↑ Summary Enbld/Target/Attribute/TestAction.pm »
1 package Enbld::Target::Attribute::CommandTest;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use parent qw/Enbld::Target::AttributeExtension::Command/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub initialize {
9 46 ▶ my ( $self, $param ) = @_;
Subroutine initialize: called CC=3 SCAR=13.6
Pod undocumented
10  
11 46 ▶ if ( ! defined $param ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $param) 46 0 46
12 46 my $make = $self->make_command;
13  
14 $self->{callback} = sub {
15 1 ▶ my $attributes = shift;
Subroutine __ANON__: called CC=1 SCAR=0.0
16  
17 1 return $make . ' ' . $attributes->TestAction;
18 46 };
19  
20 46 return $self;
21 }
22  
23 0 ▶ if ( $param ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($param) 0 0 0
24 0 $self->SUPER::initialize( $param );
25 0 return $self;
26 }
27  
28 # empty string is valid
29 0 $self->{is_evaluated}++;
30 }
31  
32 sub validate {
33 2 ▶ my ( $self, $string ) = @_;
Subroutine validate: called CC=1 SCAR=0.0
Pod undocumented
34  
35 # nothing check now.
36  
37 2 return $string;
38 }
39  
40 1 1;
« Enbld/Target/Attribute/CommandMake.pm ↑ Summary Enbld/Target/Attribute/TestAction.pm »