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   158 use strict;
  27         67  
  27         652  
4 27     27   135 use warnings;
  27         57  
  27         592  
5              
6 27     27   8538 use App::RecordStream::DomainLanguage::Valuation;
  27         66  
  27         701  
7              
8 27     27   213 use base ('App::RecordStream::DomainLanguage::Valuation');
  27         63  
  27         3609  
9              
10             sub new
11             {
12 273     273 0 553 my $class = shift;
13 273         475 my $keyspec = shift;
14              
15 273         792 my $this =
16             {
17             'KEYSPEC' => $keyspec,
18             };
19              
20 273         623 bless $this, $class;
21              
22 273         1060 return $this;
23             }
24              
25             sub evaluate_record
26             {
27 1307     1307 0 2232 my $this = shift;
28 1307         2050 my $r = shift;
29              
30 1307         2374 my $keyspec = $this->{'KEYSPEC'};
31              
32 1307         2099 return ${$r->guess_key_from_spec($keyspec)};
  1307         3724  
33             }
34              
35             1;