Common/Quantity.pm

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary Common/TimeMoment.pm »
1 package Data::OFN::Common::Quantity;
2  
3 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶use Mo qw(build is);
Subroutine BEGIN: called CC=1 SCAR=2.6
7 use Mo::utils qw(check_required);
8 use Mo::utils::CEFACT 0.02 qw(check_cefact_unit);
9 use Mo::utils::Number 0.02 qw(check_number);
10  
11 our $VERSION = 0.03;
12  
13 has unit => (
14 is => 'ro',
15 );
16  
17 has value => (
18 is => 'ro',
19 );
20  
21 sub BUILD {
22 my $self = shift;
23  
24 # Check 'unit'.
25 check_required($self, 'unit');
26 check_cefact_unit($self, 'unit');
27  
28 # Check 'value'.
29 check_required($self, 'value');
30 check_number($self, 'value');
31  
32 return;
33 }
34  
35 1;
36  
37 __END__
↑ Summary Common/TimeMoment.pm »