File Coverage

blib/lib/App/RecordStream/DomainLanguage/Valuation/KeySpec.pm
Criterion Covered Total %
statement 22 22 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 28 30 93.3


line stmt bran cond sub pod time code
1             package App::RecordStream::DomainLanguage::Valuation::KeySpec;
2              
3 27     27   153 use strict;
  27         51  
  27         685  
4 27     27   125 use warnings;
  27         49  
  27         659  
5              
6 27     27   9501 use App::RecordStream::DomainLanguage::Valuation;
  27         58  
  27         709  
7              
8 27     27   148 use base ('App::RecordStream::DomainLanguage::Valuation');
  27         55  
  27         4531  
9              
10             sub new
11             {
12 273     273 0 429 my $class = shift;
13 273         390 my $keyspec = shift;
14              
15 273         681 my $this =
16             {
17             'KEYSPEC' => $keyspec,
18             };
19              
20 273         487 bless $this, $class;
21              
22 273         862 return $this;
23             }
24              
25             sub evaluate_record
26             {
27 1307     1307 0 1818 my $this = shift;
28 1307         1683 my $r = shift;
29              
30 1307         1927 my $keyspec = $this->{'KEYSPEC'};
31              
32 1307         1625 return ${$r->guess_key_from_spec($keyspec)};
  1307         2667  
33             }
34              
35             1;