File Coverage

blib/lib/POE/Component/SmokeBox/Result.pm
Criterion Covered Total %
statement 15 15 100.0
branch 1 2 50.0
condition 1 2 50.0
subroutine 5 5 100.0
pod 3 3 100.0
total 25 27 92.5


line stmt bran cond sub pod time code
1             package POE::Component::SmokeBox::Result;
2             $POE::Component::SmokeBox::Result::VERSION = '0.58';
3             #ABSTRACT: object defining SmokeBox job results.
4              
5 21     21   18404 use strict;
  21         55  
  21         608  
6 21     21   130 use warnings;
  21         46  
  21         2827  
7              
8             sub new {
9 51     51 1 1961 my $package = shift;
10 51         259 return bless [ ], $package;
11             }
12              
13             sub add_result {
14 84     84 1 334 my $self = shift;
15 84   50     776 my $result = shift || return;
16 84 50       423 return unless ref $result eq 'HASH';
17 84         268 push @{ $self }, $result;
  84         543  
18             }
19              
20             sub results {
21 100     100 1 112205 return @{ $_[0] };
  100         740  
22             }
23              
24             1;
25              
26             __END__