| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package App::RecordStream::Aggregator::First; | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | our $VERSION = "4.0.24"; | 
| 4 |  |  |  |  |  |  |  | 
| 5 | 6 |  |  | 6 |  | 3113 | use strict; | 
|  | 6 |  |  |  |  | 14 |  | 
|  | 6 |  |  |  |  | 173 |  | 
| 6 | 6 |  |  | 6 |  | 33 | use warnings; | 
|  | 6 |  |  |  |  | 14 |  | 
|  | 6 |  |  |  |  | 166 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 | 6 |  |  | 6 |  | 321 | use App::RecordStream::Aggregator::InjectInto::Field; | 
|  | 6 |  |  |  |  | 15 |  | 
|  | 6 |  |  |  |  | 125 |  | 
| 9 | 6 |  |  | 6 |  | 31 | use App::RecordStream::DomainLanguage::Registry; | 
|  | 6 |  |  |  |  | 12 |  | 
|  | 6 |  |  |  |  | 134 |  | 
| 10 |  |  |  |  |  |  |  | 
| 11 | 6 |  |  | 6 |  | 33 | use base qw(App::RecordStream::Aggregator::InjectInto::Field); | 
|  | 6 |  |  |  |  | 11 |  | 
|  | 6 |  |  |  |  | 942 |  | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | #sub new -- passed through | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | #sub new_from_valuation -- passed through | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  | sub combine_field | 
| 18 |  |  |  |  |  |  | { | 
| 19 | 72 |  |  | 72 | 0 | 91 | my $this   = shift; | 
| 20 | 72 |  |  |  |  | 89 | my $cookie = shift; | 
| 21 | 72 |  |  |  |  | 82 | my $value  = shift; | 
| 22 |  |  |  |  |  |  |  | 
| 23 | 72 | 100 |  |  |  | 226 | return defined($cookie) ? $cookie : $value; | 
| 24 |  |  |  |  |  |  | } | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  | sub short_usage | 
| 27 |  |  |  |  |  |  | { | 
| 28 | 0 |  |  | 0 | 0 |  | return "first value for a field"; | 
| 29 |  |  |  |  |  |  | } | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | sub long_usage | 
| 32 |  |  |  |  |  |  | { | 
| 33 | 0 |  |  | 0 | 0 |  | return < | 
| 34 |  |  |  |  |  |  | Usage: first, | 
| 35 |  |  |  |  |  |  | First value of specified field. | 
| 36 |  |  |  |  |  |  | EOF | 
| 37 |  |  |  |  |  |  | } | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | App::RecordStream::Aggregator->register_implementation('first', __PACKAGE__); | 
| 40 |  |  |  |  |  |  |  | 
| 41 |  |  |  |  |  |  | App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'first', 'VALUATION'); | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | 1; |