blib/lib/Pugs/Compiler/Rule.pm

filter: Statementstmt 100% 18 / 18 Branchbran 50.0% 3 / 6 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 80.0% 28 / 35 CC 5 SCAR 13.5
CC
5
Cov
81%
compile
6.1
BEGIN
1.0
BEGIN
1.0
CRAP 3.9
« blib/lib/Pugs/Runtime/Common.pm ↑ Summary blib/lib/Pugs/Runtime/StrPos.pm »
1 10 ▶use 5.006001;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Pugs::Compiler::Rule;
6  
7 10 our $VERSION = '0.37';
8  
9 10 ▶use base 'Pugs::Compiler::Regex';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶sub compile {
Subroutine compile: called CC=5 SCAR=18.1
Pod documented
12 2 my ( $class, $rule_source, $param ) = @_;
13 2 ▶ $param = ref $param ? { %$param } : {};
Branch: 1 branch
BranchTrueFalseTotal
ref $param ? : 0 2 2
14 $param->{ratchet} = 1
15 2 ▶ unless exists $param->{ratchet};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $param->{"ratchet"} 2 0 2
16 $param->{sigspace} = 1
17 unless exists $param->{sigspace} ||
18 2 ▶ exists $param->{s};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $param->{"sigspace"} or exists $param->{"s"} 2 0 2
Condition33%1/3
exists $param->{"sigspace"} or exists $param->{"s"}
l!l&&r!l&&!r
002
MC/DC0%0/2
exists $param->{"sigspace"} or exists $param->{"s"}
exists $param->{"sigspace"} exists $param->{"s"}
Truth table33%1/3
A or B
A= exists $param->{"sigspace"}B= exists $param->{"s"}
ABresult
1X1
011
000
19 2 $class->SUPER::compile( $rule_source, $param );
20 }
21  
22 10 1;
23 __END__
« blib/lib/Pugs/Runtime/Common.pm ↑ Summary blib/lib/Pugs/Runtime/StrPos.pm »