SmokeBox/Backend/Base.pm

filter: Statementstmt 88.0% 22 / 25 Branchbran 62.5% 5 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 100% 5 / 5 totaltotal 84.7% 39 / 46 SCAR 18.3
CC
6
Cov
82%
check
2.1
index
2.1
smoke
2.1
CRAP 6.2
« SmokeBox/Smoker.pm ↑ Summary SmokeBox/Job.pm »
1 package POE::Component::SmokeBox::Backend::Base;
2 53 $POE::Component::SmokeBox::Backend::Base::VERSION = '0.56';
3 #ABSTRACT: Base class for Backend smokers.
4  
5 53 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 53 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub new {
9 111 ▶ my $package = shift;
Subroutine new: called CC=2 SCAR=6.9
Pod documented
10 111 my %opts = @_;
11 111 $opts{lc $_} = delete $opts{$_} for keys %opts;
12 111 my $self = bless \%opts, $package;
13 111 $self->_data();
14 111 return $self;
15 }
16  
17 sub _data {
18 0 ▶ my $self = shift;
Subroutine _data: not called CC=1 SCAR=6.9
19 $self->{_data} =
20 {
21 0 check => [ 'DUMMY' ],
22 index => [ 'DUMMY' ],
23 smoke => [ 'DUMMY' ],
24 digest => [ 'DUMMY' ],
25 };
26 0 return;
27 }
28  
29 sub check {
30 69 ▶ my $self = shift;
Subroutine check: called CC=2 SCAR=7.2
Pod documented
31 69 ▶ return $self->{_data}->{'check'} if $self->{_data}->{'check'};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"_data"}{"check"} 69 0 69
32 }
33  
34 sub index {
35 9 ▶ my $self = shift;
Subroutine index: called CC=2 SCAR=7.2
Pod documented
36 9 ▶ return $self->{_data}->{'index'} if $self->{_data}->{'index'};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"_data"}{"index"} 9 0 9
37 }
38  
39 sub smoke {
40 41 ▶ my $self = shift;
Subroutine smoke: called CC=2 SCAR=7.2
Pod documented
41 41 ▶ return $self->{_data}->{'smoke'} if $self->{_data}->{'smoke'};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"_data"}{"smoke"} 41 0 41
42 }
43  
44 sub digest {
45 107 ▶ my $self = shift;
Subroutine digest: called CC=2 SCAR=6.9
Pod documented
46 107 ▶ return $self->{_data}->{'digest'} if $self->{_data}->{'digest'};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"_data"}{"digest"} 33 74 107
47 }
48  
49 53 1;
50  
51 __END__
« SmokeBox/Smoker.pm ↑ Summary SmokeBox/Job.pm »