« blib/lib/App/RecordStream/Deaggregator/Field.pm
↑ Summary
blib/lib/App/RecordStream/Stream/Printer.pm »
| 1 | package App::RecordStream::DomainLanguage::Valuation::Sub; | ||
| 2 | |||
| 3 | 29 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 29 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 29 | ▶ | use App::RecordStream::DomainLanguage::Valuation; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 29 | ▶ | use base ('App::RecordStream::DomainLanguage::Valuation'); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | sub new | ||
| 11 | { | ||
| 12 | 152 | ▶ | my $class = shift; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 13 | 152 | my $subref = shift; | |
| 14 | |||
| 15 | 152 | my $this = | |
| 16 | { | ||
| 17 | 'SUBREF' => $subref, | ||
| 18 | }; | ||
| 19 | |||
| 20 | 152 | bless $this, $class; | |
| 21 | |||
| 22 | 152 | return $this; | |
| 23 | } | ||
| 24 | |||
| 25 | sub evaluate_record | ||
| 26 | { | ||
| 27 | 40 | ▶ | my $this = shift; |
|
Subroutine
evaluate_record: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 28 | 40 | my $r = shift; | |
| 29 | |||
| 30 | 40 | my $subref = $this->{'SUBREF'}; | |
| 31 | |||
| 32 | 40 | return $subref->($r); | |
| 33 | } | ||
| 34 | |||
| 35 | 29 | 1; | |