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

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 4 totaltotal 88.2% 30 / 34 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/App/RecordStream/DomainLanguage.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/InjectInto/Subrefs.pm »
1 package App::RecordStream::Stream::Base;
2  
3 112 ▶use JSON::MaybeXS;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 112 ▶use App::RecordStream::Record;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 112 ▶use App::RecordStream::OutputStream;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 112 my $json = JSON->new;
9  
10 sub new
11 {
12 55 ▶ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
13  
14 55 my $this =
15 {
16 };
17  
18 55 bless $this, $class;
19  
20 55 return $this;
21 }
22  
23 sub accept_record
24 {
25 15 ▶ my $this = shift;
Subroutine accept_record: called CC=1 SCAR=0.0
Pod undocumented
26 15 my $record = shift;
27  
28 15 my $line = App::RecordStream::OutputStream::hashref_string($record);
29  
30 15 return $this->accept_line($line);
31 }
32  
33 sub accept_line
34 {
35 43 ▶ my $this = shift;
Subroutine accept_line: called CC=1 SCAR=0.0
Pod undocumented
36 43 my $line = shift;
37  
38 43 my $record = App::RecordStream::Record->new($json->decode($line));
39  
40 43 return $this->accept_record($record);
41 }
42  
43 sub finish
44 ▶{
Subroutine finish: called CC=1 SCAR=0.0
Pod undocumented
45 }
46  
47 112 1;
« blib/lib/App/RecordStream/DomainLanguage.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/InjectInto/Subrefs.pm »