« blib/lib/App/RecordStream/Aggregator/Maximum.pm
↑ Summary
blib/lib/App/RecordStream/Test/Tester.pm »
| 1 | package App::RecordStream::Aggregator::Minimum; | ||||||||||
| 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::InjectInto::Field; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 7 | ▶ | use App::RecordStream::DomainLanguage::Registry; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 7 | ▶ | use base qw(App::RecordStream::Aggregator::InjectInto::Field); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | #sub new -- passed through | ||||||||||
| 14 | |||||||||||
| 15 | #sub new_from_valuation -- passed through | ||||||||||
| 16 | |||||||||||
| 17 | sub combine_field | ||||||||||
| 18 | { | ||||||||||
| 19 | 18 | ▶ | my $this = shift; | ||||||||
|
Subroutine
combine_field: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 20 | 18 | my $cookie = shift; | |||||||||
| 21 | 18 | my $value = shift; | |||||||||
| 22 | |||||||||||
| 23 | 18 | ▶ | return $value unless ( defined $cookie ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | |||||||||||
| 25 | 12 | ▶ | if ( $cookie > $value ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | { | ||||||||||
| 27 | 5 | return $value; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 7 | return $cookie; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | sub short_usage | ||||||||||
| 34 | { | ||||||||||
| 35 | 1 | ▶ | return "minimum value for a field"; | ||||||||
|
Subroutine
short_usage: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | sub long_usage | ||||||||||
| 39 | { | ||||||||||
| 40 | 0 | ▶ | return <<EOF; | ||||||||
|
Subroutine
long_usage: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 41 | Usage: min,<field> | ||||||||||
| 42 | Minimum value of specified field. | ||||||||||
| 43 | EOF | ||||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 7 | App::RecordStream::Aggregator->register_implementation('minimum', __PACKAGE__); | |||||||||
| 47 | 7 | App::RecordStream::Aggregator->register_implementation('min', __PACKAGE__); | |||||||||
| 48 | |||||||||||
| 49 | 7 | App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'minimum', 'VALUATION'); | |||||||||
| 50 | 7 | App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'min', 'VALUATION'); | |||||||||
| 51 | |||||||||||
| 52 | 7 | 1; | |||||||||