| 1 | package Math::SymbolicX::Calculator::Command::Assignment; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | ▶ | use 5.006; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 1 | ▶ | use base 'Math::SymbolicX::Calculator::Command'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 1 | our $VERSION = '0.02'; | |||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 11 | 0 | my $proto = shift; | |||||||||||||||||||
| 12 | 0 | ▶ | my $class = ref($proto)||$proto; | ||||||||||||||||||
|
Condition0%0/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 0 | my %args = @_; | |||||||||||||||||||
| 15 | my $self = bless { | ||||||||||||||||||||
| 16 | symbol => $args{symbol}, | ||||||||||||||||||||
| 17 | object => $args{object}, | ||||||||||||||||||||
| 18 | 0 | } => $class; | |||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 0 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 0 | ▶ | sub _execute { | ||||||||||||||||||
|
Subroutine
_execute: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 24 | 0 | my $self = shift; | |||||||||||||||||||
| 25 | 0 | my $c = shift; | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 0 | my $sym = $self->{symbol}; | |||||||||||||||||||
| 28 | 0 | my $func = $self->{object}; | |||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 0 | $c->{stash}{$sym} = $func; | |||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 0 | return($sym, '==', $func); | |||||||||||||||||||
| 33 | } | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 1 | 1; | |||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | __END__ | ||||||||||||||||||||