blib/lib/PMLTQ/Relation/TreexFilelistIterator.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/CurrentFilelistIterator.pm ↑ Summary blib/lib/PMLTQ/Relation/PMLREFIterator.pm »
1 package PMLTQ::Relation::TreexFilelistIterator;
2 12 our $AUTHORITY = 'cpan:MATY';
3 12 $PMLTQ::Relation::TreexFilelistIterator::VERSION = '1.5.0';
4 # ABSTRACT: Same as L<PMLTQ::Relation::FileListIterator> but for Treex files
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 12 ▶use base qw(PMLTQ::Relation::TreexFileIterator);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 12 our $PROGRESS; ### newly added
12 12 our $STOP; ### newly added
13  
14 sub next {
15 0 ▶ my ($self)=@_;
Subroutine next: not called CC=12 SCAR=50.5
Pod undocumented
16 0 my $conditions=$self->[PMLTQ::Relation::CurrentFileIterator::CONDITIONS];
17 0 my $n=$self->[PMLTQ::Relation::CurrentFileIterator::NODE];
18 0 my $f=$self->[PMLTQ::Relation::CurrentFileIterator::FILE];
19 0 ▶ while ($n) {
Branch: 1 branch
BranchTrueFalseTotal
if ($n) 0 0 0
20 $n = $n->following
21 0 ▶ || (($PROGRESS ? $PROGRESS->() : 1) && $STOP && do { $n = undef; last })
Branch: 1 branch
BranchTrueFalseTotal
$PMLTQ::Relation::TreexFilelistIterator::PROGRESS ? : 0 0 0
Condition0%0/15
$n->following || ($PMLTQ::Relation::TreexFilelistIterator::PROGRESS ? &$PMLTQ::Relation::TreexFilelistIterator::PROGRESS() : 1) && $PMLTQ::Relation::TreexFilelistIterator::STOP && do { $n = undef; last } || $self->tree(++$self->[3]) || $self->_next_file
l!l&&r!l&&!r
000
$n->following or $PMLTQ::Relation::TreexFilelistIterator::PROGRESS ? &$PMLTQ::Relation::TreexFilelistIterator::PROGRESS() : 1 and $PMLTQ::Relation::TreexFilelistIterator::STOP and do { $n = undef; last } or $self->tree(++$self->[3])
l!l&&r!l&&!r
000
$n->following or $PMLTQ::Relation::TreexFilelistIterator::PROGRESS ? &$PMLTQ::Relation::TreexFilelistIterator::PROGRESS() : 1 and $PMLTQ::Relation::TreexFilelistIterator::STOP and do { $n = undef; last }
l!l&&r!l&&!r
000
$PMLTQ::Relation::TreexFilelistIterator::PROGRESS ? &$PMLTQ::Relation::TreexFilelistIterator::PROGRESS() : 1 and $PMLTQ::Relation::TreexFilelistIterator::STOP and do { $n = undef; last }
!ll&&!rl&&r
000
$PMLTQ::Relation::TreexFilelistIterator::PROGRESS ? &$PMLTQ::Relation::TreexFilelistIterator::PROGRESS() : 1 and $PMLTQ::Relation::TreexFilelistIterator::STOP
!ll&&!rl&&r
000
MC/DC0%0/6
$n->following || ($PMLTQ::Relation::TreexFilelistIterator::PROGRESS ? &$PMLTQ::Relation::TreexFilelistIterator::PROGRESS() : 1) && $PMLTQ::Relation::TreexFilelistIterator::STOP && do { $n = undef; last } || $self->tree(++$self->[3]) || $self->_next_file
$n->following $PMLTQ::Relation::TreexFilelistIterator::PROGRESS ? &$PMLTQ::Relation::TreexFilelistIterator::PROGRESS() : 1 $PMLTQ::Relation::TreexFilelistIterator::STOP do { $n = undef; last } $self->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::TreexFilelistIterator::PROGRESS ? &$PMLTQ::Relation::TreexFilelistIterator::PROGRESS() : 1C= $PMLTQ::Relation::TreexFilelistIterator::STOPD= do { $n = undef; last }E= $self->tree(++$self->[3])F= $self->_next_file
ABCDEFresult
1XXXXX1
0111XX1
00XX1X1
010X1X1
01101X1
00XX011
010X011
0110011
00XX000
010X000
0110000
22 || $self->tree(++$self->[PMLTQ::Relation::CurrentFileIterator::TREE_NO])
23 || $self->_next_file();
24 0 ▶ unless ($n) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($n) 0 0 0
25 0 ▶ while (TredMacro::NextFile()) {
Branch: 1 branch
BranchTrueFalseTotal
if (TredMacro::NextFile()) 0 0 0
26 0 $self->[PMLTQ::Relation::CurrentFileIterator::TREE_NO]=0;
27 0 $f = $TredMacro::grp->{FSFile};
28 0 $self->[PMLTQ::Relation::CurrentFileIterator::FILE_QUEUE] = [$f];
29 0 $n = $self->_next_file();
30 0 ▶ last if $n;
Branch: 1 branch
BranchTrueFalseTotal
if $n 0 0 0
31 }
32 }
33 0 ▶ last if $conditions->($n,$f);
Branch: 1 branch
BranchTrueFalseTotal
if &$conditions($n, $f) 0 0 0
34 }
35 0 return $self->[PMLTQ::Relation::CurrentFileIterator::NODE]=$n;
36 }
37  
38 12 1; # End of PMLTQ::Relation::TreexFilelistIterator
39  
40 __END__
« blib/lib/PMLTQ/Relation/CurrentFilelistIterator.pm ↑ Summary blib/lib/PMLTQ/Relation/PMLREFIterator.pm »