line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::RecordStream::Aggregator::Minimum; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = "4.0.24"; |
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
3841
|
use strict; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
145
|
|
6
|
6
|
|
|
6
|
|
26
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
133
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
366
|
use App::RecordStream::Aggregator::InjectInto::Field; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
114
|
|
9
|
6
|
|
|
6
|
|
26
|
use App::RecordStream::DomainLanguage::Registry; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
126
|
|
10
|
|
|
|
|
|
|
|
11
|
6
|
|
|
6
|
|
30
|
use base qw(App::RecordStream::Aggregator::InjectInto::Field); |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
1075
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#sub new -- passed through |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#sub new_from_valuation -- passed through |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub combine_field |
18
|
|
|
|
|
|
|
{ |
19
|
18
|
|
|
18
|
0
|
44
|
my $this = shift; |
20
|
18
|
|
|
|
|
37
|
my $cookie = shift; |
21
|
18
|
|
|
|
|
36
|
my $value = shift; |
22
|
|
|
|
|
|
|
|
23
|
18
|
100
|
|
|
|
80
|
return $value unless ( defined $cookie ); |
24
|
|
|
|
|
|
|
|
25
|
12
|
100
|
|
|
|
36
|
if ( $cookie > $value ) |
26
|
|
|
|
|
|
|
{ |
27
|
5
|
|
|
|
|
30
|
return $value; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
7
|
|
|
|
|
41
|
return $cookie; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub short_usage |
34
|
|
|
|
|
|
|
{ |
35
|
0
|
|
|
0
|
0
|
|
return "minimum value for a field"; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub long_usage |
39
|
|
|
|
|
|
|
{ |
40
|
0
|
|
|
0
|
0
|
|
return <
|
41
|
|
|
|
|
|
|
Usage: min, |
42
|
|
|
|
|
|
|
Minimum value of specified field. |
43
|
|
|
|
|
|
|
EOF |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
App::RecordStream::Aggregator->register_implementation('minimum', __PACKAGE__); |
47
|
|
|
|
|
|
|
App::RecordStream::Aggregator->register_implementation('min', __PACKAGE__); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'minimum', 'VALUATION'); |
50
|
|
|
|
|
|
|
App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'min', 'VALUATION'); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |