Branch Coverage

blib/lib/PPI/Element.pm
Criterion Covered Total %
branch 66 94 70.2


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 425735 0 if &_INSTANCE($top, "PPI::Document")
259 5 78 unless my $parent = $PPI::Element::_PARENT{$key}
262 23 55 unless $$elements[$position + 1]
280 7 2316 unless my $parent = $PPI::Element::_PARENT{$key}
284 2291 8 if $it->significant
303 4 72 unless my $parent = $PPI::Element::_PARENT{$key}
306 18 54 unless $position and $$elements[$position - 1]
324 67239 1217663 unless my $parent = $PPI::Element::_PARENT{$key}
328 1043067 2598532 if $it->significant
354 0 18 unless $cursor = $cursor->first_element
382 0 18 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 280651 1004892 if $sib_walk->can("feature_mods")
571 0 64 unless my $parent = $self->parent
589 0 64 unless $_[0]->remove
611 1 0 ref $_[0] ? :
612 0 1 unless my $replace = &_INSTANCE(shift(), ref $self)
646 0 81550 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 176 81374 unless (exists $self->{'_location'})
762 0 176 unless my $Document = $self->document
763 0 176 if ($Document->isa("PPI::Document::Fragment"))
772 0 176 unless $Document->index_locations
773 0 176 unless (exists $self->{'_location'})
788 0 1 unless ($self == $self->top)
797 0 1 if (&_INSTANCE($_[0], "PPI::Element"))
800 0 0 unless $Token->{'_location'}
801 0 0 unless builtin::refaddr($Token) == builtin::refaddr($start)
835 4 1 defined $_[0]{'content'} ? :
867 769 0 if ref $_[1]
870 6225 0 &_INSTANCE($_[0], 'PPI::Element') ? :
871 1 6224 &_INSTANCE($_[1], 'PPI::Element') ? :