File Coverage

blib/lib/App/RecordStream/Clumper/WrappedClumperCallback.pm
Criterion Covered Total %
statement 28 28 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 4 0.0
total 36 40 90.0


line stmt bran cond sub pod time code
1             package App::RecordStream::Clumper::WrappedClumperCallback;
2              
3 4     4   27 use strict;
  4         9  
  4         102  
4 4     4   20 use warnings;
  4         9  
  4         98  
5              
6 4     4   494 use App::RecordStream::Aggregator;
  4         8  
  4         78  
7 4     4   22 use App::RecordStream::Record;
  4         10  
  4         730  
8              
9             sub new {
10 22     22 0 47 my $class = shift;
11 22         41 my $clumper = shift;
12 22         42 my $next = shift;
13              
14 22         73 my $this = {
15             'CLUMPER' => $clumper,
16             'NEXT' => $next,
17             };
18 22         48 bless $this, $class;
19              
20 22         102 return $this;
21             }
22              
23             sub clumper_callback_begin {
24 36     36 0 69 my $this = shift;
25 36         61 my $bucket = shift;
26              
27 36         148 return $this->{'CLUMPER'}->clumper_begin($bucket);
28             }
29              
30             sub clumper_callback_push_record {
31 180     180 0 293 my $this = shift;
32 180         339 my $cookie = shift;
33 180         276 my $record = shift;
34              
35 180         612 return $this->{'CLUMPER'}->clumper_push_record($cookie, $record, $this->{'NEXT'});
36             }
37              
38             sub clumper_callback_end {
39 36     36 0 62 my $this = shift;
40 36         68 my $cookie = shift;
41              
42 36         154 return $this->{'CLUMPER'}->clumper_end($cookie, $this->{'NEXT'});
43             }
44              
45             1;