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   863 use strict;
  7         11  
  7         157  
4 7     7   28 use warnings;
  7         9  
  7         136  
5              
6 7     7   2112 use App::RecordStream::Aggregator::InjectInto;
  7         14  
  7         155  
7              
8 7     7   36 use base qw(App::RecordStream::Aggregator::InjectInto);
  7         11  
  7         1234  
9              
10             sub new
11             {
12 46     46 0 81 my $class = shift;
13 46         59 my $initial = shift;
14 46         63 my $combine = shift;
15 46         62 my $squish = shift;
16              
17 46         141 my $this =
18             {
19             'initial' => $initial,
20             'combine' => $combine,
21             'squish' => $squish,
22             };
23              
24 46         75 bless $this, $class;
25              
26 46         129 return $this;
27             }
28              
29             sub initial
30             {
31 16     16 0 200 my $this = shift;
32              
33 16         56 return $this->{'initial'}->();
34             }
35              
36             sub combine
37             {
38 58     58 0 97 my $this = shift;
39              
40 58         146 return $this->{'combine'}->(@_);
41             }
42              
43             sub squish
44             {
45 16     16 0 127 my $this = shift;
46              
47 16         69 return $this->{'squish'}->(@_);
48             }
49              
50             1;