Branch Coverage

blib/lib/SVG/DOM.pm
Criterion Covered Total %
branch 44 114 38.6


line true false branch
18 1 0 if (my(@children) = $self->getChildren)
32 0 3 unless (@children)
35 0 0 unless @children
39 3 2 if $children[$index] == $self
53 0 0 unless (@children)
56 0 0 unless @children
68 2 0 if (my $parent = $self->getParent)
71 2 0 if (defined $index and scalar @children > $index)
85 1 0 if (my $parent = $self->getParent)
88 1 0 if ($index)
102 1 0 if (my(@children) = $self->getChildren)
115 7 0 if ($self->{'-childs'})
116 6 1 if (wantarray)
132 1 0 if (exists $self->{'-childs'})
133 1 0 if (scalar @{$self->{'-childs'};})
150 8 0 if ($self->{'-parent'})
166 0 0 unless $parent
188 0 0 if $parent == $self
202 0 0 if $parent == $ancestor
214 0 0 if (my $parent = $self->getParent)
227 1 0 if (my $parent = $self->getParent)
229 1 0 if $siblings >= 2
241 1 0 if (exists $self->{'-name'})
262 0 2 unless exists $self->{'-docref'}
263 0 2 unless exists $self->{'-docref'}{'-elist'}
266 2 0 if (defined $element) { }
267 2 0 if (exists $elist->{$element})
268 0 2 wantarray ? :
277 0 0 wantarray ? :
293 0 1 wantarray ? :
303 1 0 if (exists $self->{'id'})
316 0 14 unless defined $id
318 3 11 if (exists $idlist->{$id})
333 0 0 if (exists $self->{$attr})
348 0 0 unless $i =~ /^-/
351 0 0 wantarray ? :
378 0 0 if (exists $self->{'-cdata'})
409 0 0 unless $refChild
411 0 0 if $index < 0
422 0 1 unless $refChild
424 0 1 if $index < 0
435 1 0 if $self->getParent
444 0 0 if $self->getParent
455 0 0 if $newChild->{'-parent'} eq $self
459 0 0 if $index < 0
473 1 3 if $index < 0
497 0 0 if $key eq '-childs' or $key eq '-parent'
498 0 0 if ($key eq '-docref') { }
503 0 0 if $dockey eq '-childs' or $dockey eq '-parent' or $dockey eq '-idlist' or $dockey eq '-elist' or $dockey eq '-document' or $dockey eq '-docref'
518 0 0 if ($deep)
539 5 2 if ($child eq $refChild)
563 0 2 if (defined $newChild->{'id'})
567 0 2 unless defined $self->{'-docref'}{'-elist'}
569 1 1 unless defined $self->{'-docref'}{'-elist'}{$newChild->{'-name'}}
584 2 2 unless (@{$self->{'-childs'};})
593 0 4 if (defined $oldChild->{'id'} and exists $self->{'-docref'}{'-idlist'}{$oldChild->{'id'}})
598 2 2 if (exists $self->{'-docref'}{'-elist'}{$oldChild->{'-name'}})