File Coverage

blib/lib/App/RecordStream/Aggregator/InjectInto/Subrefs.pm
Criterion Covered Total %
statement 25 25 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 4 0.0
total 33 37 89.1


line stmt bran cond sub pod time code
1             package App::RecordStream::Aggregator::InjectInto::Subrefs;
2              
3 7     7   916 use strict;
  7         16  
  7         171  
4 7     7   34 use warnings;
  7         15  
  7         157  
5              
6 7     7   2156 use App::RecordStream::Aggregator::InjectInto;
  7         20  
  7         179  
7              
8 7     7   41 use base qw(App::RecordStream::Aggregator::InjectInto);
  7         16  
  7         1156  
9              
10             sub new
11             {
12 46     46 0 92 my $class = shift;
13 46         76 my $initial = shift;
14 46         75 my $combine = shift;
15 46         82 my $squish = shift;
16              
17 46         158 my $this =
18             {
19             'initial' => $initial,
20             'combine' => $combine,
21             'squish' => $squish,
22             };
23              
24 46         109 bless $this, $class;
25              
26 46         153 return $this;
27             }
28              
29             sub initial
30             {
31 16     16 0 233 my $this = shift;
32              
33 16         75 return $this->{'initial'}->();
34             }
35              
36             sub combine
37             {
38 58     58 0 111 my $this = shift;
39              
40 58         189 return $this->{'combine'}->(@_);
41             }
42              
43             sub squish
44             {
45 16     16 0 91 my $this = shift;
46              
47 16         71 return $this->{'squish'}->(@_);
48             }
49              
50             1;