Branch Coverage

blib/lib/MDOM/Node.pm
Criterion Covered Total %
branch 48 114 42.1


line true false branch
111 0 3 unless my $Element = _INSTANCE(shift(), 'MDOM::Element')
112 0 3 if $MDOM::Node::_PARENT{refaddr $Element}
154 11 2 wantarray ? :
211 10 0 wantarray ? :
229 1 0 wantarray ? :
269 0 2 if ($idx < 0) { }
272 0 0 if $$el[$cursor]->significant and ++$idx >= 0
277 2 2 if $$el[$cursor]->significant and --$idx < 0
300 0 4 unless my $Element = _INSTANCE(shift(), 'MDOM::Element')
305 2 0 if refaddr $self == refaddr $Element
368 0 3 unless my $wanted = $self->_wanted(shift())
376 5 4 if $rv
379 0 9 unless defined $rv
382 9 0 unless $Element->isa('MDOM::Node')
386 0 0 if ($Element->isa('MDOM::Structure')) { }
387 0 0 if $Element->finish
389 0 0 if $Element->start
395 0 3 if ($@)
400 3 0 @found ? :
424 0 2 unless my $wanted = $self->_wanted(shift())
431 2 1 if $rv
434 0 1 unless defined $rv
437 1 0 unless $Element->isa('MDOM::Node')
441 0 0 if ($Element->isa('MDOM::Structure')) { }
442 0 0 if $Element->finish
444 0 0 if $Element->start
450 0 2 if ($@)
455 0 2 unless $rv
476 0 0 $rv ? :
492 0 5 unless my $child = _INSTANCE(shift(), 'MDOM::Element')
499 0 5 unless defined $p
540 0 3 unless my $wanted = $self->_wanted(shift())
548 5 3 if ($rv)
550 0 5 unless $element->delete
556 0 3 unless defined $rv
558 0 3 if (_INSTANCE $element, 'MDOM::Node')
564 0 3 if ($@)
578 8 0 defined $_[0] ? :
579 0 0 if $^W
584 0 8 if ref $it eq 'CODE'
585 0 8 if (ref $it)
587 0 0 if $^W
592 5 3 unless substr($it, 0, 6) eq 'MDOM::'
593 0 8 unless (_CLASS $it and $it->isa('MDOM::Element'))
595 0 0 if $^W
604 0 8 if (defined $_[0])
606 0 0 if (ref $content eq 'Regexp') { }
0 0 elsif (ref $content) { }
610 0 0 if $^W
630 8 0 ref $code eq 'CODE' ? :
659 0 0 unless my $first = $$self{'children'}[0]
672 78 124 if ($_[0]{'children'})
675 202 741 if $$_{'children'}
754 0 3 if $Element->isa('MDOM::Node')
758 1 0 unless $Node->isa('MDOM::Structure')
759 0 0 if $Node->start
762 0 0 if $Node->finish