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.56';
3             #ABSTRACT: object defining SmokeBox job results.
4              
5 21     21   17019 use strict;
  21         52  
  21         603  
6 21     21   125 use warnings;
  21         50  
  21         2755  
7              
8             sub new {
9 51     51 1 1447 my $package = shift;
10 51         268 return bless [ ], $package;
11             }
12              
13             sub add_result {
14 84     84 1 281 my $self = shift;
15 84   50     734 my $result = shift || return;
16 84 50       440 return unless ref $result eq 'HASH';
17 84         248 push @{ $self }, $result;
  84         466  
18             }
19              
20             sub results {
21 100     100 1 114783 return @{ $_[0] };
  100         647  
22             }
23              
24             1;
25              
26             __END__