Branch Coverage

blib/lib/Tree/Binary.pm
Criterion Covered Total %
branch 72 74 97.3


line true false branch
35 2 6237 unless defined $node
53 1 5 unless defined $node_value
59 1 1 unless $uid
65 4 3077 unless &blessed($tree) and $tree->isa('Tree::Binary')
69 1582 1495 if (not $tree->isLeaf) { }
80 1 37 unless $self->hasLeft
83 8 29 if (not $left->isLeaf) { }
95 4 3033 unless &blessed($tree) and $tree->isa('Tree::Binary')
99 1682 1351 if (not $tree->isLeaf) { }
110 1 20 unless $self->hasRight
113 11 9 if (not $right->isLeaf) { }
207 26702 27 if (not $tree->isRoot) { }
219 1 30220 unless defined $func
220 1 30219 unless ref $func eq 'CODE'
222 13671 16548 if defined $self->{'_left'}
223 13175 17044 if defined $self->{'_right'}
233 2541 2691 if $self->hasLeft
234 2569 2663 if $self->hasRight
241 1736 1817 if $self->hasLeft
242 1725 1828 if $self->hasRight
249 440 455 if $self->hasLeft
250 433 462 if $self->hasRight
251 244 651 $left_height > $right_height ? :
257 4 211 unless &blessed($visitor) and $visitor->isa('Tree::Binary::Visitor') || $visitor->can('visit')
288 4 8 if $self->hasLeft
289 5 7 if $self->hasRight
303 0 2 unless defined $cloned_node
315 5229 9 unless defined $seen
319 5228 10 unless ref $node
321 0 10 if exists do { $seen }->{$node}
323 4 6 if (&blessed($node)) { }
325 2 2 if ($node->can('clone')) { }
337 3 3 if (ref $node eq 'SCALAR' or ref $node eq 'REF') { }
1 2 elsif (ref $node eq 'ARRAY') { }
1 1 elsif (ref $node eq 'HASH') { }
376 2926 3812 if defined $self->{'_left'}
377 2811 3927 if defined $self->{'_right'}