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   149 use strict;
  27         49  
  27         657  
4 27     27   124 use warnings;
  27         49  
  27         591  
5              
6 27     27   126 use App::RecordStream::DomainLanguage::Valuation;
  27         56  
  27         504  
7              
8 27     27   116 use base ('App::RecordStream::DomainLanguage::Valuation');
  27         46  
  27         4048  
9              
10             sub new
11             {
12 152     152 0 261 my $class = shift;
13 152         191 my $subref = shift;
14              
15 152         409 my $this =
16             {
17             'SUBREF' => $subref,
18             };
19              
20 152         328 bless $this, $class;
21              
22 152         416 return $this;
23             }
24              
25             sub evaluate_record
26             {
27 40     40 0 787 my $this = shift;
28 40         52 my $r = shift;
29              
30 40         73 my $subref = $this->{'SUBREF'};
31              
32 40         310 return $subref->($r);
33             }
34              
35             1;