Sequence/Analyser/OL/Numbered.pm

filter: Statementstmt 41.1% 7 / 17 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 2 / 5 Podpod 100% 3 / 3 totaltotal 38.7% 12 / 31 CC 4 SCAR 23.7
CC
4
Cov
30%
analyse
20.0
new
2.0
done
2.0
CRAP 10.8
↑ Summary Sequence.pm »
1 package List::Analyse::Sequence::Analyser::OL::Numbered;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
7 0 return bless {}, shift;
8 }
9  
10 0 ▶sub analyse {
Subroutine analyse: not called CC=4 SCAR=30.0
Pod documented
11 0 my $self = shift;
12 0 my $datum = shift;
13  
14 0 ▶ if( exists $self->{last_num} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"last_num"}) 0 0 0
15 0 $self->{last_num}++;
16  
17 0 ▶ return 1 if $datum =~ /^\s*$self->{last_num}/;
Branch: 1 branch
BranchTrueFalseTotal
if $datum =~ /^\s*$self->{"last_num"}/ 0 0 0
18 0 return;
19 }
20  
21 0 ▶ ($self->{last_num}) = $datum =~ /^\s*(\d+)/ or return;
Branch: 1 branch
BranchTrueFalseTotal
($self->{"last_num"}) = $datum =~ /^\s*(\d+)/ or return 0 0 0
22 0 return 1;
23 }
24  
25 0 ▶sub done {1}
Subroutine done: not called CC=1 SCAR=6.9
Pod documented
26 1 1;
27  
28 __END__
↑ Summary Sequence.pm »