blib/lib/App/RecordStream/Aggregator/Array.pm

filter: Statementstmt 93.1% 27 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 81.8% 9 / 11 Podpod 0.0% 0 / 5 totaltotal 80.0% 36 / 45 CC 1 SCAR 1.7
CC
1
Cov
93%
long_usage
2.0
argct
2.0
BEGIN
1.0
CRAP 1.2
« blib/lib/App/RecordStream/Operation/eval.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/CountBy.pm »
1 package App::RecordStream::Aggregator::Array;
2  
3 7 our $VERSION = "4.0.25";
4  
5 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 7 ▶use App::RecordStream::Aggregator::MapReduce::Field;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 7 ▶use App::RecordStream::Aggregator;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 7 ▶use App::RecordStream::DomainLanguage::Registry;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 7 ▶use base 'App::RecordStream::Aggregator::MapReduce::Field';
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 16 ▶sub map_field {
Subroutine map_field: called CC=1 SCAR=0.0
Pod undocumented
15 16 my ($this, $value) = @_;
16  
17 16 return [$value];
18 }
19  
20 12 ▶sub reduce {
Subroutine reduce: called CC=1 SCAR=0.0
Pod undocumented
21 12 my ($this, $cookie, $cookie2) = @_;
22  
23 12 return [@$cookie, @$cookie2];
24 }
25  
26 0 ▶sub long_usage {
Subroutine long_usage: not called CC=1 SCAR=6.9
Pod undocumented
27 0 return <<EOF;
28 Usage: array,<field>
29 Collect values from specified field into an array.
30 EOF
31 }
32  
33 1 ▶sub short_usage {
Subroutine short_usage: called CC=1 SCAR=0.0
Pod undocumented
34 1 return "collect values from provided field into an array";
35 }
36  
37 0 ▶sub argct {
Subroutine argct: not called CC=1 SCAR=6.9
Pod undocumented
38 0 return 1;
39 }
40  
41 7 App::RecordStream::Aggregator->register_implementation('array', __PACKAGE__);
42  
43 7 App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'array', 'VALUATION');
44  
45 7 1;
« blib/lib/App/RecordStream/Operation/eval.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/CountBy.pm »