Branch Coverage

blib/lib/PPI/Node.pm
Criterion Covered Total %
branch 95 126 75.4


line true false branch
112 0 1 unless my $Element = &_INSTANCE(shift(), "PPI::Element")
113 0 1 if $PPI::Node::_PARENT{&refaddr($Element)}
150 2 0 if (wantarray) { }
211 2150 0 wantarray ? :
227 29949 30223 if wantarray
230 68365 37236 if $_->significant
249 2 858 unless defined &_NUMBER($index)
275 24223 122125 if ($idx < 0) { }
278 22665 2786 if $el->[$cursor]->significant and ++$idx >= 0
283 120287 40258 if $el->[$cursor]->significant and --$idx < 0
306 5 29 unless my $Element = &_INSTANCE(shift(), "PPI::Element")
311 29 50 if &refaddr($self) == &refaddr($Element)
374 3 5138 unless my $wanted = $self->_wanted(shift())
383 16739 327455 if $rv
386 0 344194 unless defined $rv
389 285638 58556 unless $Element->isa("PPI::Node")
393 21495 37061 if ($Element->isa('PPI::Structure')) { }
394 21464 31 if $Element->finish
396 21495 0 if $Element->start
403 0 5138 unless ($ok)
408 4299 839 @found ? :
432 0 2209 unless my $wanted = $self->_wanted(shift())
442 39 734041 if ($element_rv)
448 23708 710333 unless defined $element_rv
451 599775 110558 unless $Element->isa("PPI::Node")
455 41863 68695 if ($Element->isa('PPI::Structure')) { }
456 41817 46 if defined $Element->finish
458 41863 0 if defined $Element->start
465 0 2209 unless ($ok)
470 2170 39 unless $rv
491 3 2166 $rv ? :
509 0 66 unless my $child = &_INSTANCE(shift(), "PPI::Element")
516 1 65 unless defined $p
534 0 4 unless my $child = &_INSTANCE(shift(), "PPI::Element")
535 0 4 unless my $replacement = &_INSTANCE(shift(), "PPI::Element")
539 3 1 $success ? :
561 0 30 unless my $wanted = $self->_wanted(shift())
569 62 207 if ($rv)
571 0 62 unless $element->delete
577 0 207 unless defined $rv
579 43 164 if (&_INSTANCE($element, "PPI::Node"))
586 0 30 unless ($ok)
600 7379 1 defined $_[0] ? :
601 0 1 if $^W
606 3727 3652 if &_CODELIKE($it)
607 1 3651 if (ref $it)
609 0 1 if $^W
614 1613 2038 unless substr($it, 0, 5) eq "PPI::"
615 1 3650 unless (&_CLASS($it) and $it->isa("PPI::Element"))
617 0 1 if $^W
626 0 3650 if (defined $_[0])
628 0 0 if (ref $content eq 'Regexp') { }
0 0 elsif (ref $content) { }
632 0 0 if $^W
652 3650 0 ref $code eq 'CODE' ? :
681 0 7979 unless my $first = $self->{'children'}[0]
694 16792 80454 if ($_[0]{'children'})
697 97226 310496 if $_->{'children'}
757 1 3 unless defined $old_child_index
786 21 96 if $Element->isa("PPI::Node")
790 29 4 unless $Node->isa("PPI::Structure")
792 4 0 if $Node->start
795 4 0 if $Node->finish