Branch Coverage

blib/lib/XML/Simple/Sugar.pm
Criterion Covered Total %
branch 113 232 48.7


line true false branch
41 6 0 @_ ? :
49 3 0 @_ ? :
0 3 if @_ != 1
3 0 $#_ >= 0 ? :
3 0 Type::Tiny::XS::Str($xml) ? :
3 0 if ($#_ >= 0)
62 14 0 @_ ? :
63 2 12 if (defined $self->xml_parent) { }
71 3 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
3 0 @_ ? :
0 3 unless ($____nobble_checks)
0 3 if @_ != 1
3 0 $#_ >= 0 ? :
0 0 XXX ? :
0 0 if ($#_ >= 0)
0 3 unless ($____nobble_checks)
73 7 0 if ($self->xml_autovivify or grep /^$attribute$/u, keys %{$self->xml_parent->xml_data->{$self->xml_node}[$self->xml_index];}) { }
93 3 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
3 0 @_ ? :
0 3 unless ($____nobble_checks)
0 3 if @_ != 0
97 2 3 unless UNIVERSAL::isa($self->xml_data->{$_}, 'ARRAY')
102 1 0 @_ ? :
0 1 if @_ != 1
1 0 $#_ >= 0 ? :
1 0 Type::Tiny::XS::Str($attr) ? :
1 0 if ($#_ >= 0)
108 6 0 @_ ? :
0 6 if @_ > 1
2 4 $#_ >= 0 ? :
2 0 Type::Tiny::XS::Str($content) ? :
2 4 if ($#_ >= 0)
109 2 4 if ($content) { }
118 2 0 @_ ? :
0 2 if @_ != 1
2 0 $#_ >= 0 ? :
2 0 Type::Tiny::XS::AUTO::TC1($xs) ? :
2 0 if ($#_ >= 0)
124 1 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
1 0 @_ ? :
0 1 unless ($____nobble_checks)
0 1 if @_ != 2
1 0 $#_ >= 0 ? :
0 0 Type::Tiny::XS::Str($node) ? :
0 0 if ($#_ >= 0)
0 1 unless ($____nobble_checks)
1 0 $#_ >= 1 ? :
0 0 Type::Tiny::XS::AUTO::TC1($content) ? :
0 0 if ($#_ >= 1)
0 1 unless ($____nobble_checks)
128 3 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
3 0 @_ ? :
0 3 unless ($____nobble_checks)
0 3 if @_ != 2
3 0 $#_ >= 0 ? :
0 0 Type::Tiny::XS::Str($node) ? :
0 0 if ($#_ >= 0)
0 3 unless ($____nobble_checks)
3 0 $#_ >= 1 ? :
0 0 XXX ? :
0 0 if ($#_ >= 1)
0 3 unless ($____nobble_checks)
130 2 1 if (UNIVERSAL::isa($self->xml_data->{$node}, 'ARRAY')) { }
131 1 1 if ($self->xml_autovivify or grep /^$attribute$/u, keys %{$self->xml_data->{$node}[$self->xml_index];}) { }
147 1 0 if ($self->xml_autovivify or grep /^$attribute$/u, keys %{$self->xml_data->{$node};}) { }
164 19 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
19 0 @_ ? :
0 19 unless ($____nobble_checks)
0 19 if @_ != 2
19 0 $#_ >= 0 ? :
0 0 Type::Tiny::XS::Str($node) ? :
0 0 if ($#_ >= 0)
0 19 unless ($____nobble_checks)
19 0 $#_ >= 1 ? :
0 0 XXX ? :
0 0 if ($#_ >= 1)
0 19 unless ($____nobble_checks)
165 17 2 if ($content->[0] =~ /^[0-9]+$/u) { }
2 0 elsif ($content->[0] =~ /^all$/iu) { }
167 17 0 if ($self->xml_autovivify) { }
168 6 11 unless ($self->xml_data->{$node})
171 8 9 unless (UNIVERSAL::isa($self->xml_data->{$node}[$content->[0]], 'HASH'))
181 0 0 unless ($self->xml_data->{$node})
185 0 0 unless (UNIVERSAL::isa($self->xml_data->{$node}[$content->[0]], 'HASH'))
204 1 16 if (defined $content->[1] and UNIVERSAL::isa($content->[1], 'XML::Simple::Sugar')) { }
2 14 elsif (defined $content->[1]) { }
212 2 15 if (defined $content->[2] and UNIVERSAL::isa($content->[2], 'HASH'))
221 1 1 if (UNIVERSAL::isa($self->xml_data->{$node}, 'ARRAY'))
238 12 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
12 0 @_ ? :
0 12 unless ($____nobble_checks)
0 12 if @_ != 2
12 0 $#_ >= 0 ? :
0 0 Type::Tiny::XS::Str($node) ? :
0 0 if ($#_ >= 0)
0 12 unless ($____nobble_checks)
12 0 $#_ >= 1 ? :
0 0 Type::Tiny::XS::Str($content) ? :
0 0 if ($#_ >= 1)
0 12 unless ($____nobble_checks)
243 51 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
51 0 @_ ? :
0 51 unless ($____nobble_checks)
0 51 if @_ != 1
51 0 $#_ >= 0 ? :
0 0 Type::Tiny::XS::Str($node) ? :
0 0 if ($#_ >= 0)
0 51 unless ($____nobble_checks)
244 22 29 unless ($self->xml_data->{$node})
245 21 1 if ($self->xml_autovivify == 1) { }
254 50 0 if (UNIVERSAL::isa($self->xml_data->{$node}, 'ARRAY')) { }
278 177 0 @_ ? :
0 177 if @_ > 1
35 142 $#_ >= 0 ? :
280 91 86 if $node eq 'DESTROY'
281 35 51 $content ? :