Branch Coverage

blib/lib/PRANG/Graph/Context.pm
Criterion Covered Total %
branch 37 46 80.4


line true false branch
102 0 28 unless &blessed($thing)
104 0 28 if ($thing->can('preferred_prefix')) { }
0 28 elsif ($thing->can('xmlns_prefix')) { }
123 62 425 if ($xmlns)
124 15 47 if (not exists $self->rxsi->{$xmlns}) { }
133 112 375 $newnode_name && $prefix ? :
143 15 472 if ($new_prefix)
176 48 13 if (defined(my $prefix = $self->rxsi->{$xmlns})) { }
183 13 0 if ($victim)
201 44 45 if ($self->xsi_virgin) { }
205 44 0 if ($self->rxsi)
238 17 9 $node ? :
0 26 $skip_ok ? :
276 15 22 unless $self->has_node
279 18 4 if ($node->isa('XML::LibXML::Element')) { }
4 0 elsif ($node->isa('XML::LibXML::Text')) { }
0 0 elsif ($node) { }
281 4 14 if ($node->hasAttributes)
295 2 16 if (@nodes > 1 and grep {not $_->isa('XML::LibXML::Element');} @nodes) { }
6 10 elsif (@nodes and $nodes[0]->isa('XML::LibXML::Element')) { }
6 8 elsif (@nodes and $nodes[0]->isa('XML::LibXML::Text')) { }
308 4 14 if (@nodes == 0) { }
318 2 2 if (length $val > 15)