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.54';
3             #ABSTRACT: Base class for Backend smokers.
4              
5 43     43   1107 use strict;
  43         98  
  43         1191  
6 43     43   227 use warnings;
  43         100  
  43         11668  
7              
8             sub new {
9 111     111 1 2932 my $package = shift;
10 111         329 my %opts = @_;
11 111         442 $opts{lc $_} = delete $opts{$_} for keys %opts;
12 111         370 my $self = bless \%opts, $package;
13 111         568 $self->_data();
14 111         601 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 179 my $self = shift;
31 69 50       337 return $self->{_data}->{'check'} if $self->{_data}->{'check'};
32             }
33              
34             sub index {
35 9     9 1 588 my $self = shift;
36 9 50       40 return $self->{_data}->{'index'} if $self->{_data}->{'index'};
37             }
38              
39             sub smoke {
40 41     41 1 2458 my $self = shift;
41 41 50       227 return $self->{_data}->{'smoke'} if $self->{_data}->{'smoke'};
42             }
43              
44             sub digest {
45 107     107 1 296 my $self = shift;
46 107 100       575 return $self->{_data}->{'digest'} if $self->{_data}->{'digest'};
47             }
48              
49             1;
50              
51             __END__