Branch Coverage

blib/lib/Tree/Ops.pm
Criterion Covered Total %
branch 128 160 80.0


line true false branch
58 194 1 if $parent->parent
84 72 0 if $c
72 272 if ($l eq '(') { }
72 200 elsif ($l eq ')') { }
85 56 16 if $c
86 54 146 if $c
105 0 137 unless my $parent = $child->parent
107 137 137 if $c->[$_] == $child
113 4 53 unless my $parent = $child->parent
115 2 51 if @$c == 0 or $c->[-1] == $child
121 8 56 unless my $parent = $child->parent
123 2 54 if @$c == 0 or $c->[0] == $child
136 11 9 if @{$child->children}
139 2 7 unless $p = $p->next
147 6 15 unless $p = $p->prev
160 0 2 if $first == $second
178 8 72 unless my $parent = $child->parent
179 34 38 $parent->children->[0] == $child ? :
184 4 60 unless my $parent = $child->parent
186 30 30 $parent->children->[-1] == $child ? :
191 1 0 @{$parent->children} == 1 ? :
196 1 1 @{$parent->children} == 0 ? :
215 0 3 unless defined(my $i = &indexOfChildInParent($child))
222 0 2 unless defined(my $i = &indexOfChildInParent($child))
231 0 1 unless my $f = $parent->first
238 0 3 unless my $n = $parent->next
245 0 2 unless my $p = $parent->prev
252 0 1 unless my $l = $parent->last
261 0 11 unless my $parent = $child->parent
279 0 5 unless defined(my $i = &indexOfChildInParent($child))
289 0 5 unless defined(my $i = &indexOfChildInParent($child))
301 0 0 unless $p->key ~~ $parent->key
306 0 3 unless $p->key ~~ $parent->key
343 2 1 $ref =~ /code/i ? :
2 3 $ref =~ /exp/i ? :
1 5 $ref =~ /hash/i ? :
1 6 $ref =~ /array/i ? :
348 13 48 if &$sel($child->key)
362 11 9 if (my(@c) = @{$child->children}) { }
378 36 37 if (my(@c) = @{$child->children})
379 12 24 if $reverse
380 12 24 if $preorder
382 24 12 unless $preorder
418 0 4 if $first == $second
422 2 2 !@f ? :
427 1 1 &above($second, $first) ? :
435 2 2 unless @f and @s
436 2 0 &indexOfChildInParent($f[-1]) > &indexOfChildInParent($s[-1]) ? :
441 1 1 &after($second, $first) ? :
448 0 1 unless my $parent = $child->parent
456 0 1 unless my $parent = $child->parent
464 0 2 unless my $parent = $start->parent
465 1 1 unless $parent == $finish->parent
469 1 0 if @c
478 1 7 if $p == $ancestor
480 1 1 if not @p or $p[-1] == $ancestor
486 9 13 if @{$start->children}
490 11 2 $p->next ? :
497 2 20 unless ($p->parent)
501 9 11 if $p->isLast
502 11 0 if (my $q = $p->next)
511 9 13 if @{$start->children}
515 11 2 $p->prev ? :
522 2 20 unless ($p->parent)
526 9 11 if $p->isFirst
527 11 0 if (my $q = $p->prev)
544 0 167 $print ? :
545 0 14 ref $value ? :
153 14 !defined($value) ? :
546 159 8 if $preorder
547 8 159 if $reverse
549 8 159 unless $preorder
553 0 17 if -e $logFile
588 0 218 $print ? :
590 108 110 unless @$c
600 0 12 $print ? :
602 6 6 unless @$c
4046 0 1 if eval "eof(${p}::DATA)"
4048 0 1 if $@
4050 0 1 if $@