« blib/lib/App/RecordStream/Aggregator/Ord2Bivariate.pm
↑ Summary
blib/lib/App/RecordStream/Aggregator/Concatenate.pm »
| 1 | package App::RecordStream::Aggregator::InjectInto::Field; | ||||||||||
| 2 | |||||||||||
| 3 | 13 | our $VERSION = "4.0.23"; | |||||||||
| 4 | |||||||||||
| 5 | 13 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 13 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 13 | ▶ | use App::RecordStream::DomainLanguage::Registry; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 13 | ▶ | use App::RecordStream::DomainLanguage::Valuation::KeySpec; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 13 | ▶ | use App::RecordStream::Aggregator::InjectInto; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 13 | ▶ | use base qw(App::RecordStream::Aggregator::InjectInto); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | sub new | ||||||||||
| 15 | { | ||||||||||
| 16 | 8 | ▶ | my $class = shift; | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 17 | 8 | my $field = shift; | |||||||||
| 18 | |||||||||||
| 19 | 8 | return new_from_valuation($class, App::RecordStream::DomainLanguage::Valuation::KeySpec->new($field)); | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | sub new_from_valuation | ||||||||||
| 23 | { | ||||||||||
| 24 | 14 | ▶ | my $class = shift; | ||||||||
|
Subroutine
new_from_valuation: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 25 | 14 | my $valuation = shift; | |||||||||
| 26 | |||||||||||
| 27 | 14 | my $this = | |||||||||
| 28 | { | ||||||||||
| 29 | 'valuation' => $valuation, | ||||||||||
| 30 | }; | ||||||||||
| 31 | |||||||||||
| 32 | 14 | bless $this, $class; | |||||||||
| 33 | |||||||||||
| 34 | 14 | return $this; | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | sub initial | ||||||||||
| 38 | { | ||||||||||
| 39 | 48 | ▶ | return undef; | ||||||||
|
Subroutine
initial: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | sub combine | ||||||||||
| 43 | { | ||||||||||
| 44 | 542 | ▶ | my $this = shift; | ||||||||
|
Subroutine
combine: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||
| 45 | 542 | my $cookie = shift; | |||||||||
| 46 | 542 | my $record = shift; | |||||||||
| 47 | |||||||||||
| 48 | 542 | my $value = $this->get_valuation()->evaluate_record($record); | |||||||||
| 49 | |||||||||||
| 50 | 542 | ▶ | if ( defined $value ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 51 | { | ||||||||||
| 52 | 542 | return $this->combine_field($cookie, $value); | |||||||||
| 53 | } | ||||||||||
| 54 | else | ||||||||||
| 55 | { | ||||||||||
| 56 | 0 | return $cookie; | |||||||||
| 57 | } | ||||||||||
| 58 | } | ||||||||||
| 59 | |||||||||||
| 60 | sub get_valuation | ||||||||||
| 61 | { | ||||||||||
| 62 | 542 | ▶ | my $this = shift; | ||||||||
|
Subroutine
get_valuation: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 63 | 542 | return $this->{'valuation'}; | |||||||||
| 64 | } | ||||||||||
| 65 | |||||||||||
| 66 | sub squish | ||||||||||
| 67 | { | ||||||||||
| 68 | 48 | ▶ | my ($this, $cookie) = @_; | ||||||||
|
Subroutine
squish: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 69 | |||||||||||
| 70 | 48 | return $cookie; | |||||||||
| 71 | } | ||||||||||
| 72 | |||||||||||
| 73 | sub argct | ||||||||||
| 74 | { | ||||||||||
| 75 | 0 | ▶ | return 1; | ||||||||
|
Subroutine
argct: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 76 | } | ||||||||||
| 77 | |||||||||||
| 78 | 13 | 1; | |||||||||