« blib/lib/App/RecordStream/Aggregator/CountBy.pm
↑ Summary
blib/lib/App/RecordStream/Clumper/Key.pm »
| 1 | package App::RecordStream::Aggregator::Records; | ||
| 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; |
|
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'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | sub new | ||
| 15 | { | ||
| 16 | 4 | ▶ | my $class = shift; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 17 | |||
| 18 | 4 | my $this = | |
| 19 | { | ||
| 20 | }; | ||
| 21 | |||
| 22 | 4 | bless $this, $class; | |
| 23 | |||
| 24 | 4 | return $this; | |
| 25 | } | ||
| 26 | |||
| 27 | sub map | ||
| 28 | { | ||
| 29 | 6 | ▶ | my ($this, $record) = @_; |
|
Subroutine
map: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 30 | |||
| 31 | 6 | return [$record]; | |
| 32 | } | ||
| 33 | |||
| 34 | sub reduce | ||
| 35 | { | ||
| 36 | 4 | ▶ | my ($this, $cookie1, $cookie2) = @_; |
|
Subroutine
reduce: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 37 | |||
| 38 | 4 | return [@$cookie1, @$cookie2]; | |
| 39 | } | ||
| 40 | |||
| 41 | sub argct | ||
| 42 | { | ||
| 43 | 0 | ▶ | return 0; |
|
Subroutine
argct: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 44 | } | ||
| 45 | |||
| 46 | sub short_usage | ||
| 47 | { | ||
| 48 | 1 | ▶ | return "returns an arrayref of all records"; |
|
Subroutine
short_usage: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 49 | } | ||
| 50 | |||
| 51 | sub long_usage | ||
| 52 | { | ||
| 53 | 0 | ▶ | return <<EOF; |
|
Subroutine
long_usage: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 54 | Usage: records | ||
| 55 | An arrayref of all records. | ||
| 56 | EOF | ||
| 57 | } | ||
| 58 | |||
| 59 | 7 | App::RecordStream::Aggregator->register_implementation('records', __PACKAGE__); | |
| 60 | 7 | App::RecordStream::Aggregator->register_implementation('recs', __PACKAGE__); | |
| 61 | |||
| 62 | 7 | App::RecordStream::DomainLanguage::Registry::register_ctor(__PACKAGE__, 'records'); | |
| 63 | 7 | App::RecordStream::DomainLanguage::Registry::register_ctor(__PACKAGE__, 'recs'); | |
| 64 | |||
| 65 | 7 | 1; | |