Variables.pm

filter: Statementstmt 100% 23 / 23 Branchbran 95.0% 19 / 20 Conditioncond 100% 16 / 16 MC/DCmcdc 100% 8 / 8 Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 98.5% 68 / 69 CC 19 SCAR 29.0
CC
19
Cov
98%
__ANON__
19.0
BEGIN
1.0
CRAP 18.1
↑ Summary demo.pl »
1 package Perl6::Variables;
2 1 $VERSION = '0.01';
3 1 ▶use Filter::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 my $ident = qr/ [_a-z] \w* (?: :: [_a-z] \w* )* /ix;
6 1 my $listlikely = qr/ (?: \.\. | => | , | qw | \@ $ident \b [^[] ) /x;
7 1 my $alist = qr/ [^]]* $listlikely /x;
8 1 my $hlist = qr/ [^}]* $listlikely /x;
9  
10 1 ▶FILTER {
Subroutine __ANON__: called CC=19 SCAR=29.4
11 1 $DB::single=1;
12 1 my $text = "";
13 1 pos = 0;
14 1 ▶ while (pos($_)<length($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (pos $_ < length $_) 72 1 73
15 72 ▶ m/\G \$ ($ident) \.? \[ (?=$alist) /sxgc and
Branch: 1 branch
BranchTrueFalseTotal
/\G \$ ($ident) \.? \[ (?=$alist) /cgsx and $text .= "\@{\$$1}[" and next 2 70 72
Condition100%2/2
/\G \$ ($ident) \.? \[ (?=$alist) /cgsx and $text .= "\@{\$$1}["
!ll
702
MC/DC100%1/1
/\G \$ ($ident) \.? \[ (?=$alist) /cgsx and $text .= "\@{\$$1}["
/\G \$ ($ident) \.? \[ (?=$alist) /cgsx
Truth table100%2/2
A
A= /\G \$ ($ident) \.? \[ (?=$alist) /cgsx
Aresult
00
11
16 $text .= qq/\@{\$$1}[/ and next;
17 70 ▶ m/\G \$ ($ident) \.? \[ (?!$alist) /sxgc and
Branch: 1 branch
BranchTrueFalseTotal
/\G \$ ($ident) \.? \[ (?!$alist) /cgsx and $text .= "\$$1->[" and next 1 69 70
Condition100%2/2
/\G \$ ($ident) \.? \[ (?!$alist) /cgsx and $text .= "\$$1->["
!ll
691
MC/DC100%1/1
/\G \$ ($ident) \.? \[ (?!$alist) /cgsx and $text .= "\$$1->["
/\G \$ ($ident) \.? \[ (?!$alist) /cgsx
Truth table100%2/2
A
A= /\G \$ ($ident) \.? \[ (?!$alist) /cgsx
Aresult
00
11
18 $text .= qq/\$$1\->[/ and next;
19 69 ▶ m/\G \$ ($ident) \.? \{ (?=$hlist) /sxgc and
Branch: 1 branch
BranchTrueFalseTotal
/\G \$ ($ident) \.? \{ (?=$hlist) /cgsx and $text .= "\@{\$$1}{" and next 3 66 69
Condition100%2/2
/\G \$ ($ident) \.? \{ (?=$hlist) /cgsx and $text .= "\@{\$$1}{"
!ll
663
MC/DC100%1/1
/\G \$ ($ident) \.? \{ (?=$hlist) /cgsx and $text .= "\@{\$$1}{"
/\G \$ ($ident) \.? \{ (?=$hlist) /cgsx
Truth table100%2/2
A
A= /\G \$ ($ident) \.? \{ (?=$hlist) /cgsx
Aresult
00
11
20 $text .= qq/\@{\$$1}{/ and next;
21 66 ▶ m/\G \$ ($ident) \.? \{ (?!$hlist) /sxgc and
Branch: 1 branch
BranchTrueFalseTotal
/\G \$ ($ident) \.? \{ (?!$hlist) /cgsx and $text .= "\$$1->{" and next 1 65 66
Condition100%2/2
/\G \$ ($ident) \.? \{ (?!$hlist) /cgsx and $text .= "\$$1->{"
!ll
651
MC/DC100%1/1
/\G \$ ($ident) \.? \{ (?!$hlist) /cgsx and $text .= "\$$1->{"
/\G \$ ($ident) \.? \{ (?!$hlist) /cgsx
Truth table100%2/2
A
A= /\G \$ ($ident) \.? \{ (?!$hlist) /cgsx
Aresult
00
11
22 $text .= qq/\$$1\->{/ and next;
23 65 ▶ m/\G \@ ($ident) \[ (?=$alist) /sxgc and
Branch: 1 branch
BranchTrueFalseTotal
/\G \@ ($ident) \[ (?=$alist) /cgsx and $text .= "\@$1[" and next 2 63 65
Condition100%2/2
/\G \@ ($ident) \[ (?=$alist) /cgsx and $text .= "\@$1["
!ll
632
MC/DC100%1/1
/\G \@ ($ident) \[ (?=$alist) /cgsx and $text .= "\@$1["
/\G \@ ($ident) \[ (?=$alist) /cgsx
Truth table100%2/2
A
A= /\G \@ ($ident) \[ (?=$alist) /cgsx
Aresult
00
11
24 $text .= qq/\@$1\[/ and next;
25 63 ▶ m/\G \@ ($ident) \[ (?!$alist) /sxgc and
Branch: 1 branch
BranchTrueFalseTotal
/\G \@ ($ident) \[ (?!$alist) /cgsx and $text .= "\$$1[" and next 2 61 63
Condition100%2/2
/\G \@ ($ident) \[ (?!$alist) /cgsx and $text .= "\$$1["
!ll
612
MC/DC100%1/1
/\G \@ ($ident) \[ (?!$alist) /cgsx and $text .= "\$$1["
/\G \@ ($ident) \[ (?!$alist) /cgsx
Truth table100%2/2
A
A= /\G \@ ($ident) \[ (?!$alist) /cgsx
Aresult
00
11
26 $text .= qq/\$$1\[/ and next;
27 61 ▶ m/\G \% ($ident) \{ (?=$hlist) /sxgc and
Branch: 1 branch
BranchTrueFalseTotal
/\G \% ($ident) \{ (?=$hlist) /cgsx and $text .= "\@$1{" and next 3 58 61
Condition100%2/2
/\G \% ($ident) \{ (?=$hlist) /cgsx and $text .= "\@$1{"
!ll
583
MC/DC100%1/1
/\G \% ($ident) \{ (?=$hlist) /cgsx and $text .= "\@$1{"
/\G \% ($ident) \{ (?=$hlist) /cgsx
Truth table100%2/2
A
A= /\G \% ($ident) \{ (?=$hlist) /cgsx
Aresult
00
11
28 $text .= qq/\@$1\{/ and next;
29 58 ▶ m/\G \% ($ident) \{ (?!$hlist) /sxgc and
Branch: 1 branch
BranchTrueFalseTotal
/\G \% ($ident) \{ (?!$hlist) /cgsx and $text .= "\$$1{" and next 1 57 58
Condition100%2/2
/\G \% ($ident) \{ (?!$hlist) /cgsx and $text .= "\$$1{"
!ll
571
MC/DC100%1/1
/\G \% ($ident) \{ (?!$hlist) /cgsx and $text .= "\$$1{"
/\G \% ($ident) \{ (?!$hlist) /cgsx
Truth table100%2/2
A
A= /\G \% ($ident) \{ (?!$hlist) /cgsx
Aresult
00
11
30 $text .= qq/\$$1\{/ and next;
31 57 ▶ m/\G ([^\$\@%]+|.) /xgcs and
Branch: 1 branch
BranchTrueFalseTotal
/\G ([^\$\@%]+|.) /cgsx and $text .= $1 57 0 57
32 $text .= $1;
33 }
34 1 $_ = $text . substr($_,pos);
35 1 };
36  
37 __END__
↑ Summary demo.pl »