blib/lib/PMLTQ/Relation/CurrentFilelistTreesIterator.pm

filter: Statementstmt 52.3% 22 / 42 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 24 MC/DCmcdc 0.0% 0 / 12 Subroutinesub 54.5% 6 / 11 Podpod 0.0% 0 / 5 totaltotal 27.4% 28 / 102 CC 13 SCAR 39.5
CC
13
Cov
30%
next
110.0
start
20.0
node
2.0
CRAP 51.8
« blib/lib/PMLTQ/Relation/PMLREFIterator.pm ↑ Summary blib/lib/PMLTQ/Command/convert.pm »
1 package PMLTQ::Relation::CurrentFilelistTreesIterator;
2 12 our $AUTHORITY = 'cpan:MATY';
3 12 $PMLTQ::Relation::CurrentFilelistTreesIterator::VERSION = '1.5.0';
4 # ABSTRACT: Iterates over trees in files of given file list (calling TredMacro::NextFile())
5  
6 12 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 12 ▶use base qw(PMLTQ::Relation::Iterator);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 12 ▶use constant CONDITIONS=>0;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 12 ▶use constant NODE=>1;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 12 our $PROGRESS; ### newly added
15 12 our $STOP; ### newly added
16  
17 sub start {
18 0 ▶ my ($self)=@_;
Subroutine start: not called CC=4 SCAR=30.0
Pod undocumented
19 0 TredMacro::GotoFileNo(0);
20 0 $TredMacro::this=$TredMacro::root;
21 0 $self->[NODE]=$TredMacro::this;
22 0 my $fsfile = $TredMacro::grp->{FSFile};
23 0 ▶ return ($TredMacro::this && $self->[CONDITIONS]->($TredMacro::this,$fsfile)) ? $TredMacro::this : ($TredMacro::this && $self->next);
Branch: 1 branch
BranchTrueFalseTotal
$TredMacro::this && $self->[0]->($TredMacro::this, $fsfile) ? : 0 0 0
Condition0%0/6
$TredMacro::this and $self->[0]->($TredMacro::this, $fsfile)
!ll&&!rl&&r
000
$TredMacro::this and $self->next
!ll&&!rl&&r
000
MC/DC0%0/2
$TredMacro::this and $self->[0]->($TredMacro::this, $fsfile)
$TredMacro::this $self->[0]->($TredMacro::this, $fsfile)
MC/DC0%0/2
$TredMacro::this and $self->next
$TredMacro::this $self->next
Truth table0%0/3
A and B
A= $TredMacro::thisB= $self->[0]->($TredMacro::this, $fsfile)
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= $TredMacro::thisB= $self->next
ABresult
0X0
100
111
24 }
25 sub next {
26 0 ▶ my ($self)=@_;
Subroutine next: not called CC=10 SCAR=47.0
Pod undocumented
27 0 my $conditions=$self->[CONDITIONS];
28 0 my $n=$self->[NODE];
29 0 my $fsfile = $TredMacro::grp->{FSFile};
30 0 ▶ while ($n) {
Branch: 1 branch
BranchTrueFalseTotal
if ($n) 0 0 0
31 $n = $n->following
32 0 ▶ || (($PROGRESS ? $PROGRESS->() : 1) && $STOP && do { $n = undef; last })
Condition0%0/6
TredMacro::NextFile() and $fsfile = $TredMacro::grp->{"FSFile"} and $TredMacro::this
!ll&&!rl&&r
000
TredMacro::NextFile() and $fsfile = $TredMacro::grp->{"FSFile"}
!ll&&!rl&&r
000
MC/DC0%0/3
TredMacro::NextFile() and $fsfile = $TredMacro::grp->{"FSFile"} and $TredMacro::this
TredMacro::NextFile() $fsfile = $TredMacro::grp->{"FSFile"} $TredMacro::this
Truth table0%0/4
A and B and C
A= TredMacro::NextFile()B= $fsfile = $TredMacro::grp->{"FSFile"}C= $TredMacro::this
ABCresult
0XX0
10X0
1100
1111
33 0 ▶ || (TredMacro::NextFile() && ($fsfile=$TredMacro::grp->{FSFile}) && $TredMacro::this);
Branch: 1 branch
BranchTrueFalseTotal
$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? : 0 0 0
Condition0%0/12
$n->following || ($PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1) && $PMLTQ::Relation::CurrentFilelistTreesIterator::STOP && do { $n = undef; last } || TredMacro::NextFile() && ($fsfile = $TredMacro::grp->{'FSFile'}) && $TredMacro::this
l!l&&r!l&&!r
000
$n->following or $PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistTreesIterator::STOP and do { $n = undef; last }
l!l&&r!l&&!r
000
$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistTreesIterator::STOP and do { $n = undef; last }
!ll&&!rl&&r
000
$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistTreesIterator::STOP
!ll&&!rl&&r
000
MC/DC0%0/5
$n->following || ($PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1) && $PMLTQ::Relation::CurrentFilelistTreesIterator::STOP && do { $n = undef; last } || TredMacro::NextFile() && ($fsfile = $TredMacro::grp->{'FSFile'}) && $TredMacro::this
$n->following $PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1 $PMLTQ::Relation::CurrentFilelistTreesIterator::STOP do { $n = undef; last } TredMacro::NextFile() && ($fsfile = $TredMacro::grp->{'FSFile'}) && $TredMacro::this
Truth table0%0/8
A or B and C and D || E
A= $n->followingB= $PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1C= $PMLTQ::Relation::CurrentFilelistTreesIterator::STOPD= do { $n = undef; last }E= TredMacro::NextFile() && ($fsfile = $TredMacro::grp->{'FSFile'}) && $TredMacro::this
ABCDEresult
1XXXX1
0111X1
00XX11
010X11
011011
00XX00
010X00
011000
34 0 ▶ last if $conditions->($n,$fsfile);
Branch: 1 branch
BranchTrueFalseTotal
if &$conditions($n, $fsfile) 0 0 0
35 }
36 0 return $self->[NODE]=$n;
37 }
38 sub node {
39 0 ▶ return $_[0]->[NODE];
Subroutine node: not called CC=1 SCAR=6.9
Pod undocumented
40 }
41 sub file {
42 0 ▶ return $TredMacro::grp->{FSFile};
Subroutine file: not called CC=1 SCAR=6.9
Pod undocumented
43 }
44 sub reset {
45 0 ▶ my ($self)=@_;
Subroutine reset: not called CC=1 SCAR=6.9
Pod undocumented
46 0 $self->[NODE]=undef;
47 }
48  
49 12 1; # End of PMLTQ::Relation::CurrentFilelistTreesIterator
50  
51 __END__
« blib/lib/PMLTQ/Relation/PMLREFIterator.pm ↑ Summary blib/lib/PMLTQ/Command/convert.pm »