blib/lib/App/RecordStream/Stream/Sub.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 3 totaltotal 89.6% 26 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
new
1.0
CRAP 1.0
« blib/lib/App/RecordStream/Aggregator/MapReduce/Subrefs.pm ↑ Summary blib/lib/App/RecordStream/Clumper/WrappedClumperCallback.pm »
1 package App::RecordStream::Stream::Sub;
2  
3 2 ▶use App::RecordStream::Stream::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use base 'App::RecordStream::Stream::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub new
8 {
9 8 ▶ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
10 8 my $record_sub = shift;
11 8 my $line_sub = shift;
12  
13 8 my $this = $class->SUPER::new();
14  
15 8 $this->{'RECORD_SUB'} = $record_sub;
16 8 $this->{'LINE_SUB'} = $line_sub;
17  
18 8 bless $this, $class;
19  
20 8 return $this;
21 }
22  
23 sub accept_record
24 {
25 14 ▶ my $this = shift;
Subroutine accept_record: called CC=1 SCAR=0.0
Pod undocumented
26 14 my $record = shift;
27  
28 14 return $this->{'RECORD_SUB'}->($record);
29 }
30  
31 sub accept_line
32 {
33 8 ▶ my $this = shift;
Subroutine accept_line: called CC=1 SCAR=0.0
Pod undocumented
34 8 my $line = shift;
35  
36 8 return $this->{'LINE_SUB'}->($line);
37 }
38  
39 2 1;
« blib/lib/App/RecordStream/Aggregator/MapReduce/Subrefs.pm ↑ Summary blib/lib/App/RecordStream/Clumper/WrappedClumperCallback.pm »