Branch Coverage

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


line true false branch
35 2 8540 unless defined $node
53 1 5 unless defined $node_value
59 1 1 unless $uid
65 4 4246 unless &blessed($tree) and $tree->isa('Tree::Binary')
69 2347 1899 if (not $tree->isLeaf) { }
80 1 37 unless $self->hasLeft
83 8 29 if (not $left->isLeaf) { }
95 4 4167 unless &blessed($tree) and $tree->isa('Tree::Binary')
99 2363 1804 if (not $tree->isLeaf) { }
110 1 20 unless $self->hasRight
113 11 9 if (not $right->isLeaf) { }
207 40856 27 if (not $tree->isRoot) { }
219 1 45690 unless defined $func
220 1 45689 unless ref $func eq 'CODE'
222 20701 24988 if defined $self->{'_left'}
223 20169 25520 if defined $self->{'_right'}
233 3514 3692 if $self->hasLeft
234 3570 3636 if $self->hasRight
241 2401 2468 if $self->hasLeft
242 2376 2493 if $self->hasRight
249 608 616 if $self->hasLeft
250 594 630 if $self->hasRight
251 377 847 $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 7203 9 unless defined $seen
319 7202 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 4322 5521 if defined $self->{'_left'}
377 4191 5652 if defined $self->{'_right'}