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 2180 0 wantarray ? :
226 30424 30656 if wantarray
229 69473 37954 if $_->significant
248 2 858 unless defined &_NUMBER($index)
274 79098 2043720 if ($idx < 0) { }
277 43239 50727 if $el->[$cursor]->significant and ++$idx >= 0
282 2041851 3024037 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 5171 unless my $wanted = $self->_wanted(shift())
382 17241 338059 if $rv
385 0 355300 unless defined $rv
388 295048 60252 unless $Element->isa("PPI::Node")
392 22130 38122 if ($Element->isa('PPI::Structure')) { }
393 22099 31 if $Element->finish
395 22130 0 if $Element->start
402 0 5171 unless ($ok)
407 4328 843 @found ? :
431 0 2224 unless my $wanted = $self->_wanted(shift())
441 39 768539 if ($element_rv)
447 24037 744502 unless defined $element_rv
450 630333 114169 unless $Element->isa("PPI::Node")
454 43210 70959 if ($Element->isa('PPI::Structure')) { }
455 43164 46 if defined $Element->finish
457 43210 0 if defined $Element->start
464 0 2224 unless ($ok)
469 2185 39 unless $rv
490 3 2181 $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 7427 1 defined $_[0] ? :
598 0 1 if $^W
603 3762 3665 if &_CODELIKE($it)
604 1 3664 if (ref $it)
606 0 1 if $^W
611 1625 2039 unless substr($it, 0, 5) eq "PPI::"
612 1 3663 unless (&_CLASS($it) and $it->isa("PPI::Element"))
614 0 1 if $^W
623 0 3663 if (defined $_[0])
625 0 0 if (ref $content eq 'Regexp') { }
0 0 elsif (ref $content) { }
629 0 0 if $^W
649 3663 0 ref $code eq 'CODE' ? :
678 3 8225 unless my $first = $self->{'children'}[0]
691 16826 81633 if ($_[0]{'children'})
694 98439 320452 if $_->{'children'}
710 0 1220203 unless my $elements = $self->{'children'}
712 1168701 51502 if (defined(my $position = $PPI::Node::_POSITION_CACHE{$key}))
714 1168665 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