| 1 | package CLI::Command; | ||||||||||||||||||||
| 2 | 1 | ▶ | use CLI::Base; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 1 | @ISA = ("CLI::Base"); | |||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 1 | ▶ | use CLI qw(TIME); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 1 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 4 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||
| 11 | 4 | my $proto = shift; | |||||||||||||||||||
| 12 | 4 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 4 | my $name = shift; | |||||||||||||||||||
| 15 | 4 | my $func = shift; | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 4 | my $self = { | |||||||||||||||||||
| 18 | NAME => $name, | ||||||||||||||||||||
| 19 | TYPE => undef, | ||||||||||||||||||||
| 20 | VALUE => undef, | ||||||||||||||||||||
| 21 | MIN => undef, | ||||||||||||||||||||
| 22 | MAX => undef, | ||||||||||||||||||||
| 23 | FUNC => $func | ||||||||||||||||||||
| 24 | }; | ||||||||||||||||||||
| 25 | 4 | bless ($self, $class); | |||||||||||||||||||
| 26 | 4 | return $self; | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 2 | ▶ | sub parse { | ||||||||||||||||||
|
Subroutine
parse: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 30 | 2 | my $self = shift; | |||||||||||||||||||
| 31 | 2 | my $value = shift; | |||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 2 | ▶ | if (defined $self->function()) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 34 | 2 | &{$self->function()}($value); | |||||||||||||||||||
| 35 | } | ||||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | 1 | 1; | |||||||||||||||||||
| 39 | |||||||||||||||||||||