blib/lib/PMLTQ/Relation/CurrentFilelistIterator.pm

filter: Statementstmt 48.4% 16 / 33 Branchbran 0.0% 0 / 12 Conditioncond 0.0% 0 / 15 MC/DCmcdc 0.0% 0 / 6 Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 27.7% 20 / 72 CC 12 SCAR 47.6
CC
12
Cov
27%
next
156.0
BEGIN
1.0
BEGIN
1.0
CRAP 117.2
« blib/lib/PMLTQ/Relation/OrderIterator.pm ↑ Summary blib/lib/PMLTQ/Relation/TreexFilelistIterator.pm »
1 package PMLTQ::Relation::CurrentFilelistIterator;
2 12 our $AUTHORITY = 'cpan:MATY';
3 12 $PMLTQ::Relation::CurrentFilelistIterator::VERSION = '1.5.0';
4 # ABSTRACT: Iterates over 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::CurrentFileIterator);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 12 our $PROGRESS; ### newly added
13 12 our $STOP; ### newly added
14  
15 sub next {
16 0 ▶ my ($self)=@_;
Subroutine next: not called CC=12 SCAR=50.5
Pod undocumented
17 0 my $conditions=$self->[PMLTQ::Relation::CurrentFileIterator::CONDITIONS];
18 0 my $n=$self->[PMLTQ::Relation::CurrentFileIterator::NODE];
19 0 my $f=$self->[PMLTQ::Relation::CurrentFileIterator::FILE];
20 0 ▶ while ($n) {
Branch: 1 branch
BranchTrueFalseTotal
if ($n) 0 0 0
21 $n = $n->following
22 0 ▶ || (($PROGRESS ? $PROGRESS->() : 1) && $STOP && do { $n = undef; last })
Branch: 1 branch
BranchTrueFalseTotal
$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS ? : 0 0 0
Condition0%0/15
$n->following || ($PMLTQ::Relation::CurrentFilelistIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS() : 1) && $PMLTQ::Relation::CurrentFilelistIterator::STOP && do { $n = undef; last } || $f->tree(++$self->[3]) || $self->_next_file
l!l&&r!l&&!r
000
$n->following or $PMLTQ::Relation::CurrentFilelistIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistIterator::STOP and do { $n = undef; last } or $f->tree(++$self->[3])
l!l&&r!l&&!r
000
$n->following or $PMLTQ::Relation::CurrentFilelistIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistIterator::STOP and do { $n = undef; last }
l!l&&r!l&&!r
000
$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistIterator::STOP and do { $n = undef; last }
!ll&&!rl&&r
000
$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistIterator::STOP
!ll&&!rl&&r
000
MC/DC0%0/6
$n->following || ($PMLTQ::Relation::CurrentFilelistIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS() : 1) && $PMLTQ::Relation::CurrentFilelistIterator::STOP && do { $n = undef; last } || $f->tree(++$self->[3]) || $self->_next_file
$n->following $PMLTQ::Relation::CurrentFilelistIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS() : 1 $PMLTQ::Relation::CurrentFilelistIterator::STOP do { $n = undef; last } $f->tree(++$self->[3]) $self->_next_file
Truth table0%0/11
A or B and C and D or E || F
A= $n->followingB= $PMLTQ::Relation::CurrentFilelistIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistIterator::PROGRESS() : 1C= $PMLTQ::Relation::CurrentFilelistIterator::STOPD= do { $n = undef; last }E= $f->tree(++$self->[3])F= $self->_next_file
ABCDEFresult
1XXXXX1
0111XX1
00XX1X1
010X1X1
01101X1
00XX011
010X011
0110011
00XX000
010X000
0110000
23 || $f->tree(++$self->[PMLTQ::Relation::CurrentFileIterator::TREE_NO])
24 || $self->_next_file();
25 0 ▶ unless ($n) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($n) 0 0 0
26 0 ▶ while (TredMacro::NextFile()) {
Branch: 1 branch
BranchTrueFalseTotal
if (TredMacro::NextFile()) 0 0 0
27 0 $self->[PMLTQ::Relation::CurrentFileIterator::TREE_NO]=0;
28 0 $f = $TredMacro::grp->{FSFile};
29 0 $self->[PMLTQ::Relation::CurrentFileIterator::FILE_QUEUE] = [$f];
30 0 $n = $self->_next_file();
31 0 ▶ last if $n;
Branch: 1 branch
BranchTrueFalseTotal
if $n 0 0 0
32 }
33 }
34 0 ▶ last if $conditions->($n,$f);
Branch: 1 branch
BranchTrueFalseTotal
if &$conditions($n, $f) 0 0 0
35 }
36 0 return $self->[PMLTQ::Relation::CurrentFileIterator::NODE]=$n;
37 }
38  
39 12 1; # End of PMLTQ::Relation::CurrentFilelistIterator
40  
41 __END__
« blib/lib/PMLTQ/Relation/OrderIterator.pm ↑ Summary blib/lib/PMLTQ/Relation/TreexFilelistIterator.pm »