File Coverage

blib/lib/POE/Component/SmokeBox/Backend/Base.pm
Criterion Covered Total %
statement 20 23 86.9
branch 5 8 62.5
condition n/a
subroutine 7 8 87.5
pod 5 5 100.0
total 37 44 84.0


line stmt bran cond sub pod time code
1             package POE::Component::SmokeBox::Backend::Base;
2             $POE::Component::SmokeBox::Backend::Base::VERSION = '0.58';
3             #ABSTRACT: Base class for Backend smokers.
4              
5 43     43   1329 use strict;
  43         148  
  43         1309  
6 43     43   276 use warnings;
  43         174  
  43         13536  
7              
8             sub new {
9 111     111 1 2662 my $package = shift;
10 111         358 my %opts = @_;
11 111         493 $opts{lc $_} = delete $opts{$_} for keys %opts;
12 111         400 my $self = bless \%opts, $package;
13 111         810 $self->_data();
14 111         711 return $self;
15             }
16              
17             sub _data {
18 0     0   0 my $self = shift;
19             $self->{_data} =
20             {
21 0         0 check => [ 'DUMMY' ],
22             index => [ 'DUMMY' ],
23             smoke => [ 'DUMMY' ],
24             digest => [ 'DUMMY' ],
25             };
26 0         0 return;
27             }
28              
29             sub check {
30 69     69 1 175 my $self = shift;
31 69 50       357 return $self->{_data}->{'check'} if $self->{_data}->{'check'};
32             }
33              
34             sub index {
35 9     9 1 771 my $self = shift;
36 9 50       45 return $self->{_data}->{'index'} if $self->{_data}->{'index'};
37             }
38              
39             sub smoke {
40 41     41 1 2354 my $self = shift;
41 41 50       269 return $self->{_data}->{'smoke'} if $self->{_data}->{'smoke'};
42             }
43              
44             sub digest {
45 107     107 1 285 my $self = shift;
46 107 100       657 return $self->{_data}->{'digest'} if $self->{_data}->{'digest'};
47             }
48              
49             1;
50              
51             __END__