| 1 | # | ||||||||||||||||||||
| 2 | # (c) Jan Gehring <jan.gehring@gmail.com> | ||||||||||||||||||||
| 3 | # | ||||||||||||||||||||
| 4 | # | ||||||||||||||||||||
| 5 | # this is a simple helper class for the get() function | ||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | package Rex::Value; | ||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 49 | ▶ | use v5.14.4; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | 49 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 49 | our $VERSION = '1.16.1'; # VERSION | |||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 22 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||||||||||||
| 15 | 22 | my $that = shift; | |||||||||||||||||||
| 16 | 22 | ▶ | my $proto = ref($that) || $that; | ||||||||||||||||||
|
Condition33%1/3
ref $that || $that
MC/DC0%0/2
ref $that || $that
ref $that
$that
Truth table33%1/3
A || B
A= ref $thatB= $that
| |||||||||||||||||||||
| 17 | 22 | my $self = {@_}; | |||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 22 | bless( $self, $proto ); | |||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 22 | return $self; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 18 | ▶ | sub value { | ||||||||||||||||||
|
Subroutine
value: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 25 | 18 | my ($self) = @_; | |||||||||||||||||||
| 26 | 18 | return $self->{value}; | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 49 | 1; | |||||||||||||||||||