Snippet/TabStop/Basic.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 29 / 29 CC 3 SCAR 6.2
CC
3
Cov
100%
parse
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« Snippet/TabStop/WithTransformer.pm ↑ Summary Snippet/TabStop/WithDefault.pm »
1 package Text::Snippet::TabStop::Basic;
2 11 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 11 $Text::Snippet::TabStop::Basic::VERSION = '0.04';
4 }
5  
6 # ABSTRACT: Basic TabStop
7  
8 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 11 ▶use base qw(Text::Snippet::TabStop);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 70 ▶sub parse {
Subroutine parse: called CC=3 SCAR=11.0
Pod documented
15 70 my $class = shift;
16 70 my $src = shift;
17 70 ▶ if($src =~ m/^\$(\d+)$/ || $src =~ m/^\$\{(\d+)\}$/){
Branch: 1 branch
BranchTrueFalseTotal
if ($src =~ /^\$(\d+)$/ or $src =~ /^\$\{(\d+)\}$/) 54 16 70
Condition100%3/3
$src =~ /^\$(\d+)$/ or $src =~ /^\$\{(\d+)\}$/
l!l&&r!l&&!r
51316
MC/DC100%2/2
$src =~ /^\$(\d+)$/ or $src =~ /^\$\{(\d+)\}$/
$src =~ /^\$(\d+)$/ $src =~ /^\$\{(\d+)\}$/
Truth table100%3/3
A or B
A= $src =~ /^\$(\d+)$/B= $src =~ /^\$\{(\d+)\}$/
ABresult
1X1
011
000
18 54 return $class->_new( index => $1, src => $src );
19 }
20 16 return;
21 }
22  
23 11 1;
24  
25 __END__
« Snippet/TabStop/WithTransformer.pm ↑ Summary Snippet/TabStop/WithDefault.pm »