Branch Coverage

blib/lib/XML/Struct/Writer.pm
Criterion Covered Total %
branch 35 40 87.5


line true false branch
36 12 2 $_[0]->to ? :
53 5 12 $self->handler->can('result') ? :
63 48 0 if ($type)
65 34 14 if ($type eq 'ARRAY') { }
14 0 elsif ($type eq 'HASH') { }
66 2 32 if (@$element == 1) { }
10 22 elsif (@$element == 2) { }
69 7 3 if ((&reftype($element->[1]) // '') eq 'ARRAY') { }
1 2 elsif (not $self->attributes and %{$element->[1];}) { }
77 1 21 if (not $self->attributes and %{$element->[1];}) { }
89 2 12 if (not ref $content) { }
6 6 elsif (&reftype($content) eq 'ARRAY') { }
6 0 elsif (&reftype($content) eq 'HASH') { }
93 4 2 @$content ? :
104 5 9 $name ? :
117 31 25 if (ref $child) { }
132 42 4 if $element->[1]
149 7 10 if ($self->handler->can('xml_decl') and $self->xmldecl)
156 0 17 if @_
161 0 17 if @_