Condition Coverage

blib/lib/XML/Simple.pm
Criterion Covered Total %
condition 97 126 76.9


and 3 conditions

line !l l&&!r l&&r condition
165 2 241 203 $_[0] and UNIVERSAL::isa($_[0], 'XML::Simple')
393 0 136 2 ref $string and ref $string ne 'SCALAR'
655 0 1 0 UNIVERSAL::isa($fh, 'GLOB') and not UNIVERSAL::can($fh, 'print')
753 265 1 1 $opt->{'xmldecl'} and $opt->{'xmldecl'} eq '1'
783 248 1 18 $opt->{'cache'} and not ref $opt->{'cache'}
836 221 5 3 $opt->{'strictmode'} and $dirn eq 'in'
861 54 1 9 $opt->{'strictmode'} and $dirn eq 'in'
864 2 4 0 ref $opt->{'forcearray'} eq 'HASH' and $opt->{'forcearray'}{$el}
915 247 4 1 $opt->{'variables'} and not UNIVERSAL::isa($opt->{'variables'}, 'HASH')
1027 1655 1840 42 not @_ and keys %$attr == 1
1029 34 8 0 $self->{'opt'}{'valueattrlist'} and $self->{'opt'}{'valueattrlist'}{$k}
1045 3368 8 0 not defined $val and $self->{'opt'}{'suppressempty'}
1082 2 632 4 defined $val and UNIVERSAL::isa($val, 'ARRAY')
1094 125 509 0 $key ne $self->{'opt'}{'contentkey'} and $self->{'opt'}{'forcearray'} == 1 || ref $self->{'opt'}{'forcearray'} eq 'HASH' && ($self->{'opt'}{'forcearray'}{$key} || grep(($key =~ /$_/), @{$$self{'opt'}{'forcearray'}{'_regex'};}))
1120 2 4401 322 defined $val and UNIVERSAL::isa($val, 'ARRAY')
1131 37 4 10 UNIVERSAL::isa($val, 'HASH') and keys %$val == 1
1146 2178 206 0 $count == 1 and exists $attr->{'anon'}
145 0 61 $count == 1 and exists $attr->{'anon'} and UNIVERSAL::isa($attr->{'anon'}, 'ARRAY')
1156 2310 13 0 not %$attr and exists $self->{'opt'}{'suppressempty'}
1157 2 7 2 defined $self->{'opt'}{'suppressempty'} and $self->{'opt'}{'suppressempty'} eq ''
1170 0 0 4 UNIVERSAL::isa($val, 'HASH') and keys %$val == 1
1256 0 1912 0 UNIVERSAL::isa($arrayref->[$i], 'HASH') and exists $arrayref->[$i]{$key}
1385 0 16 54 ref $val eq 'HASH' and keys %$val == 1
16 54 0 ref $val eq 'HASH' and keys %$val == 1 and exists $val->{$contentkey}
1418 0 2186 0 defined $name && ($name ne '' ? 1 : 0)
1452 84 3 2082 UNIVERSAL::isa($ref, 'HASH') and keys %$ref
87 2082 0 UNIVERSAL::isa($ref, 'HASH') and keys %$ref and $self->{'opt'}{'keyattr'}
5 74 2003 UNIVERSAL::isa($ref, 'HASH') and keys %$ref and $self->{'opt'}{'keyattr'} and not $is_root
1519 2 1 4 $default_ns_uri and $uri eq $default_ns_uri
1553 2 0 2 exists $self->{'opt'}{'suppressempty'} and not defined $self->{'opt'}{'suppressempty'}
1566 174 3771 0 not ref $value and $self->{'opt'}{'valueattr'}
3766 5 0 not ref $value and $self->{'opt'}{'valueattr'} and $self->{'opt'}{'valueattr'}{$key}
1587 3734 2 3 $self->{'opt'}{'attrindent'} and not $first_arg
1628 2849 2 0 not defined $value and $self->{'opt'}{'suppressempty'}
1678 29 1 1847 exists $keyattr->{$name} and exists $hash{$keyattr->{$name}[0]}
1855 1622 3310 11 $pos > 0 and $$clist[$pos - 1] eq '0'

or 2 conditions

line l !l condition
369 0 147 $ENV{'XML_SIMPLE_PREFERRED_PARSER'} || ''
1819 11 0 $element->{'LocalName'} || ''
1828 6 0 $attr->{'LocalName'} || ''

or 3 conditions

line l !l&&r !l&&!r condition
1071 126 0 1142 %$attr or @_
1094 171 0 338 $self->{'opt'}{'forcearray'} == 1 || ref $self->{'opt'}{'forcearray'} eq 'HASH' && ($self->{'opt'}{'forcearray'}{$key} || grep(($key =~ /$_/), @{$$self{'opt'}{'forcearray'}{'_regex'};}))
1575 176 0 3769 ref $value or $self->{'opt'}{'noattr'}
1598 158 22 1799 @nested or defined $text_content