Branch Coverage

blib/lib/PPI/Node.pm
Criterion Covered Total %
branch 101 132 76.5


line true false branch
111 0 1 unless my $Element = &_INSTANCE(shift(), "PPI::Element")
112 0 1 if $PPI::Node::_PARENT{builtin::refaddr($Element)}
149 2 0 if (wantarray) { }
210 2191 0 wantarray ? :
226 30847 31116 if wantarray
229 70562 38341 if $_->significant
248 2 858 unless defined &_NUMBER($index)
274 32531 143211 if ($idx < 0) { }
277 30965 2890 if $el->[$cursor]->significant and ++$idx >= 0
282 141327 53557 if $el->[$cursor]->significant and --$idx < 0
305 5 29 unless my $Element = &_INSTANCE(shift(), "PPI::Element")
310 29 50 if builtin::refaddr($self) == builtin::refaddr($Element)
373 3 5199 unless my $wanted = $self->_wanted(shift())
382 17274 337882 if $rv
385 0 355156 unless defined $rv
388 294912 60244 unless $Element->isa("PPI::Node")
392 22114 38130 if ($Element->isa('PPI::Structure')) { }
393 22083 31 if $Element->finish
395 22114 0 if $Element->start
402 0 5199 unless ($ok)
407 4344 855 @found ? :
431 0 2257 unless my $wanted = $self->_wanted(shift())
441 39 769850 if ($element_rv)
447 24108 745742 unless defined $element_rv
450 631383 114359 unless $Element->isa("PPI::Node")
454 43255 71104 if ($Element->isa('PPI::Structure')) { }
455 43209 46 if defined $Element->finish
457 43255 0 if defined $Element->start
464 0 2257 unless ($ok)
469 2218 39 unless $rv
490 3 2214 $rv ? :
508 0 66 unless my $child = &_INSTANCE(shift(), "PPI::Element")
513 1 65 unless defined $p
531 0 4 unless my $child = &_INSTANCE(shift(), "PPI::Element")
532 0 4 unless my $replacement = &_INSTANCE(shift(), "PPI::Element")
536 3 1 $success ? :
558 0 30 unless my $wanted = $self->_wanted(shift())
566 62 207 if ($rv)
568 0 62 unless $element->delete
574 0 207 unless defined $rv
576 43 164 if (&_INSTANCE($element, "PPI::Node"))
583 0 30 unless ($ok)
597 7488 1 defined $_[0] ? :
598 0 1 if $^W
603 3790 3698 if &_CODELIKE($it)
604 1 3697 if (ref $it)
606 0 1 if $^W
611 1654 2043 unless substr($it, 0, 5) eq "PPI::"
612 1 3696 unless (&_CLASS($it) and $it->isa("PPI::Element"))
614 0 1 if $^W
623 0 3696 if (defined $_[0])
625 0 0 if (ref $content eq 'Regexp') { }
0 0 elsif (ref $content) { }
629 0 0 if $^W
649 3696 0 ref $code eq 'CODE' ? :
678 3 8224 unless my $first = $self->{'children'}[0]
691 16865 100932 if ($_[0]{'children'})
694 117777 507932 if $_->{'children'}
710 0 4167 unless my $elements = $self->{'children'}
712 2344 1823 if (defined(my $position = $PPI::Node::_POSITION_CACHE{$key}))
714 2308 36 if defined $maybe_child and builtin::refaddr($maybe_child) == $key
760 1 3 unless defined $old_child_index
789 21 96 if $Element->isa("PPI::Node")
793 29 4 unless $Node->isa("PPI::Structure")
795 4 0 if $Node->start
798 4 0 if $Node->finish