blib/lib/PMLTQ/Relation/CurrentTreeIterator.pm

filter: Statementstmt 55.5% 20 / 36 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 54.5% 6 / 11 Podpod 0.0% 0 / 5 totaltotal 38.2% 26 / 68 CC 6 SCAR 20.8
CC
6
Cov
42%
start
20.0
next
12.0
file
2.0
CRAP 8.0
« blib/lib/PMLTQ/Relation/DescendantIterator.pm ↑ Summary blib/lib/PMLTQ/Relation/PDT/AEParentIterator.pm »
1 package PMLTQ::Relation::CurrentTreeIterator;
2 12 our $AUTHORITY = 'cpan:MATY';
3 12 $PMLTQ::Relation::CurrentTreeIterator::VERSION = '1.5.0';
4 # ABSTRACT: Iterates over nodes of current tree
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 sub start {
15 0 ▶ my ($self)=@_;
Subroutine start: not called CC=4 SCAR=30.0
Pod undocumented
16 0 $TredMacro::this=$TredMacro::root;
17 0 $self->[NODE]=$TredMacro::this;
18 0 ▶ return ($TredMacro::this && $self->[CONDITIONS]->($TredMacro::this,TredMacro::CurrentFile())) ? $TredMacro::this : ($TredMacro::this && $self->next);
Branch: 1 branch
BranchTrueFalseTotal
$TredMacro::this && $self->[0]->($TredMacro::this, TredMacro::CurrentFile()) ? : 0 0 0
Condition0%0/6
$TredMacro::this and $self->[0]->($TredMacro::this, TredMacro::CurrentFile())
!ll&&!rl&&r
000
$TredMacro::this and $self->next
!ll&&!rl&&r
000
MC/DC0%0/2
$TredMacro::this and $self->[0]->($TredMacro::this, TredMacro::CurrentFile())
$TredMacro::this $self->[0]->($TredMacro::this, TredMacro::CurrentFile())
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, TredMacro::CurrentFile())
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= $TredMacro::thisB= $self->next
ABresult
0X0
100
111
19 }
20 sub next {
21 0 ▶ my ($self)=@_;
Subroutine next: not called CC=3 SCAR=24.8
Pod undocumented
22 0 my $conditions=$self->[CONDITIONS];
23 0 my $n=$self->[NODE];
24 0 my $fsfile=TredMacro::CurrentFile();
25 0 ▶ while ($n) {
Branch: 1 branch
BranchTrueFalseTotal
if ($n) 0 0 0
26 0 $n = $n->following;
27 0 ▶ last if $conditions->($n,$fsfile);
Branch: 1 branch
BranchTrueFalseTotal
if &$conditions($n, $fsfile) 0 0 0
28 }
29 0 return $self->[NODE]=$n;
30 }
31 sub file {
32 0 ▶ return TredMacro::CurrentFile();
Subroutine file: not called CC=1 SCAR=6.9
Pod undocumented
33 }
34 sub node {
35 0 ▶ return $_[0]->[NODE];
Subroutine node: not called CC=1 SCAR=6.9
Pod undocumented
36 }
37 sub reset {
38 0 ▶ my ($self)=@_;
Subroutine reset: not called CC=1 SCAR=6.9
Pod undocumented
39 0 $self->[NODE]=undef;
40 }
41  
42 12 1; # End of PMLTQ::Relation::CurrentTreeIterator
43  
44 __END__
« blib/lib/PMLTQ/Relation/DescendantIterator.pm ↑ Summary blib/lib/PMLTQ/Relation/PDT/AEParentIterator.pm »