fundamentalUnit.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 88.2% 30 / 34 CC 2 SCAR 2.4
CC
2
Cov
92%
new
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« derivedUnit.pm ↑ Summary unit.pm »
1 package FundamentalUnit;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use unitConverter;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use unit;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 # heritage
10 1 ▶use base qw( Unit );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 8 ▶sub new {
Subroutine new: called CC=2 SCAR=7.2
13 8 my ( $class ) = @_;
14 8 ▶ $class = ref($class) || $class;
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
080
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
15 8 my $this = $class->SUPER::new();
16 8 bless($this, $class);
17 8 return $this;
18 }
19  
20 22 ▶sub toBase {
Subroutine toBase: called CC=1 SCAR=0.0
21 22 return UnitConverter->identity;
22 }
23  
24 =head1 NAME
25  
26 FundamentalUnit - representation of an unit defined by itself
27  
28 =head1 DESCRIPTION
29  
30 This module maps a conceptual class that represents an unit defined by itself.
31  
32 =head1 AUTHOR
33  
34 Samuel Andres
35  
36 =head1 LICENSE
37  
38 UnLicense
39  
40 =cut
41  
42 1 1;
« derivedUnit.pm ↑ Summary unit.pm »