Branch Coverage

blib/lib/PPI/Element.pm
Criterion Covered Total %
branch 64 92 69.5


line true false branch
157 0 6 unless my $parent = shift()
159 3 14 unless $cursor = $PPI::Element::_PARENT{&refaddr($cursor)}
176 0 6 unless my $cursor = shift()
178 3 14 unless $cursor = $PPI::Element::_PARENT{&refaddr($cursor)}
202 0 0 unless $cursor = $PPI::Element::_PARENT{&refaddr($cursor)}
244 181 0 if &_INSTANCE($top, "PPI::Document")
259 5 78 unless my $parent = $PPI::Element::_PARENT{&refaddr($self)}
265 23 55 unless $$elements[$position + 1]
282 7 2219 unless my $parent = $PPI::Element::_PARENT{&refaddr($self)}
289 2194 8 if $it->significant
307 4 72 unless my $parent = $PPI::Element::_PARENT{&refaddr($self)}
313 18 54 unless $position and $$elements[$position - 1]
330 1 1503 unless my $parent = $PPI::Element::_PARENT{&refaddr($self)}
337 1482 14 if $it->significant
363 0 18 unless $cursor = $cursor->first_element
391 0 18 unless $cursor = $cursor->last_element
423 52 22 if ($element)
424 42 10 if $element->isa("PPI::Token")
427 4 18 unless $cursor = $cursor->parent
428 5 13 if ($cursor->isa("PPI::Structure") and $cursor->finish)
459 51 19 if ($element)
460 42 9 if $element->isa("PPI::Token")
463 3 16 unless $cursor = $cursor->parent
464 5 11 if ($cursor->isa("PPI::Structure") and $cursor->start)
557 0 64 unless my $parent = $self->parent
575 0 64 unless $_[0]->remove
597 1 0 ref $_[0] ? :
598 0 1 unless my $replace = &_INSTANCE(shift(), ref $self)
632 0 78751 unless $self->_ensure_location_present
655 0 94 unless my $location = $self->location
676 0 1 unless my $location = $self->location
698 0 1 unless my $location = $self->location
739 0 11 unless my $location = $self->location
746 173 78578 unless (exists $self->{'_location'})
748 0 173 unless my $Document = $self->document
749 0 173 if ($Document->isa("PPI::Document::Fragment"))
758 0 173 unless $Document->index_locations
759 0 173 unless (exists $self->{'_location'})
774 0 1 unless ($self == $self->top)
783 0 1 if (&_INSTANCE($_[0], "PPI::Element"))
786 0 0 unless $Token->{'_location'}
787 0 0 unless &refaddr($Token) == &refaddr($start)
821 4 1 defined $_[0]{'content'} ? :
851 734 0 if ref $_[1]
854 6306 0 &_INSTANCE($_[0], 'PPI::Element') ? :
855 1 6305 &_INSTANCE($_[1], 'PPI::Element') ? :