| 1 | package PMLTQ::Relation::CurrentFilelistTreesIterator; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 12 | our $AUTHORITY = 'cpan:MATY'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 12 | $PMLTQ::Relation::CurrentFilelistTreesIterator::VERSION = '1.2.2'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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
Condition0%0/6
$TredMacro::this and $self->[0]->($TredMacro::this, $fsfile)
$TredMacro::this and $self->next
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)
Truth table0%0/3
A and B
A= $TredMacro::thisB= $self->next
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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
TredMacro::NextFile() and $fsfile = $TredMacro::grp->{"FSFile"}
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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | || (TredMacro::NextFile() && ($fsfile=$TredMacro::grp->{FSFile}) && $TredMacro::this); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
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
$n->following or $PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistTreesIterator::STOP and do {
$n = undef;
last
}
$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistTreesIterator::STOP and do {
$n = undef;
last
}
$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS ? &$PMLTQ::Relation::CurrentFilelistTreesIterator::PROGRESS() : 1 and $PMLTQ::Relation::CurrentFilelistTreesIterator::STOP
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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | ▶ | last if $conditions->($n,$fsfile); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||