Branch Coverage

blib/lib/PPI/Element.pm
Criterion Covered Total %
branch 74 94 78.7


line true false branch
156 0 6 unless my $parent = shift()
158 3 14 unless $cursor = $PPI::Element::_PARENT{builtin::refaddr($cursor)}
175 0 6 unless my $cursor = shift()
177 3 14 unless $cursor = $PPI::Element::_PARENT{builtin::refaddr($cursor)}
201 0 0 unless $cursor = $PPI::Element::_PARENT{builtin::refaddr($cursor)}
243 5773 1 if &_INSTANCE($top, "PPI::Document")
259 5 80 unless my $parent = $PPI::Element::_PARENT{$key}
262 23 57 unless $$elements[$position + 1]
280 7 2314 unless my $parent = $PPI::Element::_PARENT{$key}
284 2289 8 if $it->significant
303 4 72 unless my $parent = $PPI::Element::_PARENT{$key}
306 18 54 unless $position and $$elements[$position - 1]
324 15 1632 unless my $parent = $PPI::Element::_PARENT{$key}
328 1591 56 if $it->significant
354 0 20 unless $cursor = $cursor->first_element
382 0 19 unless $cursor = $cursor->last_element
414 52 22 if ($element)
415 42 10 if $element->isa("PPI::Token")
418 4 18 unless $cursor = $cursor->parent
419 5 13 if ($cursor->isa("PPI::Structure") and $cursor->finish)
450 51 19 if ($element)
451 42 9 if $element->isa("PPI::Token")
454 3 16 unless $cursor = $cursor->parent
455 5 11 if ($cursor->isa("PPI::Structure") and $cursor->start)
476 28 26 if $sib_walk->can("feature_mods")
571 0 64 unless my $parent = $self->parent
589 0 64 unless $_[0]->remove
611 3 0 ref $_[0] ? :
612 0 3 unless my $replace = &_INSTANCE(shift(), ref $self)
646 1 81555 unless $self->_ensure_location_present
669 0 94 unless my $location = $self->location
690 0 1 unless my $location = $self->location
712 0 1 unless my $location = $self->location
753 0 11 unless my $location = $self->location
760 181 81375 unless (exists $self->{'_location'})
762 1 180 unless my $Document = $self->document
763 0 180 if ($Document->isa("PPI::Document::Fragment"))
772 0 180 unless $Document->index_locations
773 0 180 unless (exists $self->{'_location'})
788 1 2 unless ($self == $self->top)
797 1 1 if (&_INSTANCE($_[0], "PPI::Element"))
800 0 29 unless $Token->{'_location'}
801 28 1 unless builtin::refaddr($Token) == builtin::refaddr($start)
835 4 1 defined $_[0]{'content'} ? :
867 771 0 if ref $_[1]
870 6231 0 &_INSTANCE($_[0], 'PPI::Element') ? :
871 1 6230 &_INSTANCE($_[1], 'PPI::Element') ? :