Condition Coverage

lib/XML/LibXML/Simple.pm
Criterion Covered Total %
condition 73 106 68.8


and 3 conditions

line !l l&&!r l&&r condition
51 83 1 0 @_ > 1 && &blessed($_[0]) && $_[0]->isa('XML::LibXML::Simple')
68 0 0 1 $opts->{'forcearray_always'} && ref $top ne 'ARRAY'
96 81 1 0 &blessed($source) && ($source->isa('XML::LibXML::Document') || $source->isa('XML::LibXML::Element'))
239 342 0 99 ref $v eq 'HASH' and $k ne $opts->{'contentkey'}
342 99 0 ref $v eq 'HASH' and $k ne $opts->{'contentkey'} and $opts->{'forcearray_always'}
277 236 0 0 $hooks and my $hook = $$hooks{$attr->unique_key}
286 0 234 2 not ref $value and $opts->{'normalisespace'} == 2
314 304 0 0 $hooks and my $hook = $$hooks{$child->unique_key}
319 304 0 0 not defined $v and $opts->{'suppressempty'}
330 104 265 14 defined $text and $opts->{'normalisespace'} == 2
332 245 2 136 $nr_attrs + $nr_elems == 0 and defined $text
335 104 109 34 defined $text and $nr_elems == 0
367 0 0 8 ref $val eq 'HASH' and keys %$val == 1
379 146 82 12 keys %data == 1 and exists $data{'anon'}
82 0 12 keys %data == 1 and exists $data{'anon'} and ref $data{'anon'} eq 'ARRAY'
382 226 2 0 not keys %data and exists $opts->{'suppressempty'}
384 0 0 0 defined $sup && $sup eq ''
390 454 0 4 $va->{$key} and ref $val eq 'HASH'
454 0 4 $va->{$key} and ref $val eq 'HASH' and keys %$val == 1
426 0 2 42 ref $h eq 'HASH' and defined $h->{$key}
441 34 5 1 $^W and defined $out{$val}
461 0 1 1 $^W and not $default_keys
470 36 3 1 $^W and $out{$val}
497 0 17 18 ref $v eq 'HASH' and keys %$v == 1
17 4 14 ref $v eq 'HASH' and keys %$v == 1 and exists $v->{$contentkey}
498 0 21 0 ref $v eq 'HASH' and not keys %$v

or 2 conditions

line l !l condition
161 1 77 $opt{'normalizespace'} || 0
163 3 79 $opt{'searchpath'} ||= []
167 13 69 delete $opt{'forcearray'} || 0
182 31 51 $opt{'keyattr'} || \@default_attributes
195 6 17 $1 || ''
202 4 78 delete $opt{'valueattr'} || {}
211 0 82 $opt{'parseropts'} ||= {}
260 0 0 $node->namespaceURI || ''

or 3 conditions

line l !l&&r !l&&!r condition
86 0 82 0 $opts->{'parser'} || $self->_create_parser($opts->{'parseropts'})
161 4 1 77 $opt{'normalisespace'} ||= $opt{'normalizespace'} || 0
208 75 7 0 not $opt{'grouptags'} or ref $opt{'grouptags'} eq 'HASH'
239 5 7 405 $opts->{'forcearray_elem'}{$k} or grep(($k =~ /$_/), @{$$opts{'forcearray_regex'};})