RuleEngine/Input.pm

filter: Statementstmt 77.7% 14 / 18 Branchbran 50.0% 2 / 4 Conditioncond 50.0% 3 / 6 MC/DCmcdc 50.0% 2 / 4 Subroutinesub 80.0% 4 / 5 Podpod 100% 2 / 2 totaltotal 69.2% 27 / 39 CC 5 SCAR 16.7
CC
5
Cov
68%
new
12.0
value
3.0
BEGIN
1.0
CRAP 5.3
« RuleEngine/Hook.pm ↑ Summary RuleEngine/Rule.pm »
1 package VS::RuleEngine::Input;
2  
3 18 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 18 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 18 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 0 ▶sub new {
Subroutine new: not called CC=3 SCAR=24.8
Pod documented
9 0 my $self = shift;
10 0 ▶ $self = ref $self || $self;
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
11 0 ▶ croak "new() should not be called as a function" if !$self;
Branch: 1 branch
BranchTrueFalseTotal
unless $self 0 0 0
12 0 croak "Class '$self' does not override new()";
13 }
14  
15 3 ▶sub value {
Subroutine value: called CC=3 SCAR=11.0
Pod documented
16 3 my $self = shift;
17 3 ▶ $self = ref $self || $self;
Condition100%3/3
ref $self || $self
l!l&&r!l&&!r
111
MC/DC100%2/2
ref $self || $self
ref $self $self
Truth table100%3/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
18 3 ▶ croak "value() should not be called as a function" if !$self;
Branch: 1 branch
BranchTrueFalseTotal
unless $self 1 2 3
19 2 croak "Class '$self' does not override value()";
20 }
21  
22 18 1;
23 __END__
« RuleEngine/Hook.pm ↑ Summary RuleEngine/Rule.pm »