| 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
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 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; | |||||||||||||||||||