Calculator/Command/Assignment.pm

filter: Statementstmt 54.1% 13 / 24 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 4 / 6 Podpod 100% 1 / 1 totaltotal 50.0% 18 / 36 CC 2 SCAR 9.4
CC
2
Cov
48%
new
6.0
_execute
2.0
BEGIN
1.0
CRAP 2.6
« Calculator/Command.pm ↑ Summary
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
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
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__
« Calculator/Command.pm ↑ Summary