blib/lib/App/RecordStream/Accumulator.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 8 | 8 | 100.0 |
branch | n/a | ||
condition | 2 | 2 | 100.0 |
subroutine | 3 | 3 | 100.0 |
pod | 0 | 3 | 0.0 |
total | 13 | 16 | 81.2 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package App::RecordStream::Accumulator; | ||||||
2 | |||||||
3 | our $VERSION = "4.0.23"; | ||||||
4 | |||||||
5 | sub accept_record { | ||||||
6 | 359 | 359 | 0 | 527 | my $this = shift; | ||
7 | 359 | 640 | $this->accumulate_record(shift); | ||||
8 | } | ||||||
9 | |||||||
10 | sub accumulate_record { | ||||||
11 | 359 | 359 | 0 | 523 | my $this = shift; | ||
12 | 359 | 515 | push @{$this->get_records()}, shift; | ||||
359 | 614 | ||||||
13 | } | ||||||
14 | |||||||
15 | sub get_records { | ||||||
16 | 379 | 379 | 0 | 570 | my $this = shift; | ||
17 | |||||||
18 | 379 | 100 | 868 | $this->{'RECORDS'} ||= []; | |||
19 | 379 | 1526 | return $this->{'RECORDS'}; | ||||
20 | } | ||||||
21 | |||||||
22 | 1; |