blib/lib/App/RecordStream/Deaggregator/Field.pm

filter: Statementstmt 100% 29 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 3 totaltotal 92.5% 37 / 40 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/App/RecordStream/Deaggregator.pm ↑ Summary blib/lib/App/RecordStream/DomainLanguage/Valuation/Sub.pm »
1 package App::RecordStream::Deaggregator::Field;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use App::RecordStream::Deaggregator::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use App::RecordStream::DomainLanguage::Valuation::KeySpec;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use base 'App::RecordStream::Deaggregator::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 sub new
12 {
13 7 ▶ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
14 7 my $field = shift;
15  
16 7 return new_from_valuation($class, App::RecordStream::DomainLanguage::Valuation::KeySpec->new($field));
17 }
18  
19 sub new_from_valuation
20 {
21 7 ▶ my $class = shift;
Subroutine new_from_valuation: called CC=1 SCAR=0.0
Pod undocumented
22 7 my $valuation = shift;
23  
24 7 my $this =
25 {
26 'valuation' => $valuation,
27 };
28 7 bless $this, $class;
29  
30 7 return $this;
31 }
32  
33 sub deaggregate
34 {
35 17 ▶ my $this = shift;
Subroutine deaggregate: called CC=1 SCAR=0.0
Pod undocumented
36 17 my $record = shift;
37  
38 17 my $valuation = $this->{'valuation'};
39  
40 17 my $value = $valuation->evaluate_record($record);
41  
42 17 return $this->deaggregate_field($value);
43 }
44  
45 2 1;
« blib/lib/App/RecordStream/Deaggregator.pm ↑ Summary blib/lib/App/RecordStream/DomainLanguage/Valuation/Sub.pm »