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.23";
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 sub map_field {
15 16 ▶ my ($this, $value) = @_;
Subroutine map_field: called CC=1 SCAR=0.0
Pod undocumented
16  
17 16 return [$value];
18 }
19  
20 sub reduce {
21 12 ▶ my ($this, $cookie, $cookie2) = @_;
Subroutine reduce: called CC=1 SCAR=0.0
Pod undocumented
22  
23 12 return [@$cookie, @$cookie2];
24 }
25  
26 sub long_usage {
27 0 ▶ return <<EOF;
Subroutine long_usage: not called CC=1 SCAR=6.9
Pod undocumented
28 Usage: array,<field>
29 Collect values from specified field into an array.
30 EOF
31 }
32  
33 sub short_usage {
34 1 ▶ return "collect values from provided field into an array";
Subroutine short_usage: called CC=1 SCAR=0.0
Pod undocumented
35 }
36  
37 sub argct {
38 0 ▶ return 1;
Subroutine argct: not called CC=1 SCAR=6.9
Pod undocumented
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 »