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 2138 0 wantarray ? :
227 30138 30407 if wantarray
230 68725 37419 if $_->significant
249 2 858 unless defined &_NUMBER($index)
275 24551 120987 if ($idx < 0) { }
278 22981 2783 if $el->[$cursor]->significant and ++$idx >= 0
283 119128 40300 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 5214 unless my $wanted = $self->_wanted(shift())
383 16818 327562 if $rv
386 0 344380 unless defined $rv
389 285682 58698 unless $Element->isa("PPI::Node")
393 21529 37169 if ($Element->isa('PPI::Structure')) { }
394 21498 31 if $Element->finish
396 21529 0 if $Element->start
403 0 5214 unless ($ok)
408 4379 835 @found ? :
432 0 2179 unless my $wanted = $self->_wanted(shift())
442 39 738996 if ($element_rv)
448 23534 715462 unless defined $element_rv
451 603270 112192 unless $Element->isa("PPI::Node")
455 42640 69552 if ($Element->isa('PPI::Structure')) { }
456 42594 46 if defined $Element->finish
458 42640 0 if defined $Element->start
465 0 2179 unless ($ok)
470 2140 39 unless $rv
491 3 2136 $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 7425 1 defined $_[0] ? :
601 0 1 if $^W
606 3707 3718 if &_CODELIKE($it)
607 1 3717 if (ref $it)
609 0 1 if $^W
614 1595 2122 unless substr($it, 0, 5) eq "PPI::"
615 1 3716 unless (&_CLASS($it) and $it->isa("PPI::Element"))
617 0 1 if $^W
626 0 3716 if (defined $_[0])
628 0 0 if (ref $content eq 'Regexp') { }
0 0 elsif (ref $content) { }
632 0 0 if $^W
652 3716 0 ref $code eq 'CODE' ? :
681 0 7969 unless my $first = $self->{'children'}[0]
694 16735 80757 if ($_[0]{'children'})
697 97472 308936 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