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 183 0 if &_INSTANCE($top, "PPI::Document")
260 5 78 unless my $parent = $PPI::Element::_PARENT{$key}
265 23 55 unless $$elements[$position + 1]
283 7 2218 unless my $parent = $PPI::Element::_PARENT{$key}
289 2193 8 if $it->significant
308 4 72 unless my $parent = $PPI::Element::_PARENT{$key}
313 18 54 unless $position and $$elements[$position - 1]
331 1 1516 unless my $parent = $PPI::Element::_PARENT{$key}
337 1495 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 78952 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 175 78777 unless (exists $self->{'_location'})
748 0 175 unless my $Document = $self->document
749 0 175 if ($Document->isa("PPI::Document::Fragment"))
758 0 175 unless $Document->index_locations
759 0 175 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 735 0 if ref $_[1]
854 6226 0 &_INSTANCE($_[0], 'PPI::Element') ? :
855 1 6225 &_INSTANCE($_[1], 'PPI::Element') ? :