File Coverage

blib/lib/App/RecordStream/DomainLanguage/Valuation/Sub.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 27 29 93.1


line stmt bran cond sub pod time code
1             package App::RecordStream::DomainLanguage::Valuation::Sub;
2              
3 27     27   160 use strict;
  27         245  
  27         719  
4 27     27   139 use warnings;
  27         58  
  27         693  
5              
6 27     27   146 use App::RecordStream::DomainLanguage::Valuation;
  27         63  
  27         603  
7              
8 27     27   134 use base ('App::RecordStream::DomainLanguage::Valuation');
  27         58  
  27         3856  
9              
10             sub new
11             {
12 152     152 0 326 my $class = shift;
13 152         285 my $subref = shift;
14              
15 152         360 my $this =
16             {
17             'SUBREF' => $subref,
18             };
19              
20 152         304 bless $this, $class;
21              
22 152         560 return $this;
23             }
24              
25             sub evaluate_record
26             {
27 40     40 0 1753 my $this = shift;
28 40         56 my $r = shift;
29              
30 40         85 my $subref = $this->{'SUBREF'};
31              
32 40         341 return $subref->($r);
33             }
34              
35             1;