File Coverage

blib/lib/Enbld/Target/Attribute/TestAction.pm
Criterion Covered Total %
statement 20 22 90.9
branch 3 4 75.0
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 28 32 87.5


line stmt bran cond sub pod time code
1             package Enbld::Target::Attribute::TestAction;
2              
3 1     1   1416 use strict;
  1         1  
  1         23  
4 1     1   3 use warnings;
  1         1  
  1         18  
5              
6 1     1   3 use Carp;
  1         1  
  1         43  
7              
8 1     1   4 use parent qw/Enbld::Target::AttributeExtension::Command/;
  1         1  
  1         4  
9              
10             sub initialize {
11 46     46 0 89 my ( $self, $param ) = @_;
12              
13 46 100       124 if ( ! defined $param ) {
14 1         6 $self->{value} = 'check';
15 1         3 $self->{is_evaluated}++;
16              
17 1         2 return $self;
18             }
19              
20 45 50       108 if ( $param ) {
21 45         122 $self->SUPER::initialize( $param );
22 45         72 return $self;
23             }
24              
25 0           require Enbld::Exception;
26 0           croak( Enbld::Exception->new( "Attribute 'TestAction' isn't defined" ) );
27             }
28              
29             1;