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
55 83 1 0 @_ > 1 && &blessed($_[0]) && $_[0]->isa('XML::LibXML::Simple')
72 0 0 1 $opts->{'forcearray_always'} && ref $top ne 'ARRAY'
100 81 1 0 &blessed($source) && ($source->isa('XML::LibXML::Document') || $source->isa('XML::LibXML::Element'))
243 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'}
281 236 0 0 $hooks and my $hook = $$hooks{$attr->unique_key}
290 0 234 2 not ref $value and $opts->{'normalisespace'} == 2
318 304 0 0 $hooks and my $hook = $$hooks{$child->unique_key}
323 304 0 0 not defined $v and $opts->{'suppressempty'}
334 104 265 14 defined $text and $opts->{'normalisespace'} == 2
336 245 2 136 $nr_attrs + $nr_elems == 0 and defined $text
339 104 109 34 defined $text and $nr_elems == 0
371 0 0 8 ref $val eq 'HASH' and keys %$val == 1
383 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'
386 226 2 0 not keys %data and exists $opts->{'suppressempty'}
388 0 0 0 defined $sup && $sup eq ''
394 454 0 4 $va->{$key} and ref $val eq 'HASH'
454 0 4 $va->{$key} and ref $val eq 'HASH' and keys %$val == 1
430 0 2 42 ref $h eq 'HASH' and defined $h->{$key}
445 34 5 1 $^W and defined $out{$val}
465 0 1 1 $^W and not $default_keys
474 36 3 1 $^W and $out{$val}
501 0 16 19 ref $v eq 'HASH' and keys %$v == 1
16 5 14 ref $v eq 'HASH' and keys %$v == 1 and exists $v->{$contentkey}
502 0 21 0 ref $v eq 'HASH' and not keys %$v

or 2 conditions

line l !l condition
165 1 77 $opt{'normalizespace'} || 0
167 3 79 $opt{'searchpath'} ||= []
171 13 69 delete $opt{'forcearray'} || 0
186 31 51 $opt{'keyattr'} || \@default_attributes
199 6 17 $1 || ''
206 4 78 delete $opt{'valueattr'} || {}
215 0 82 $opt{'parseropts'} ||= {}
264 0 0 $node->namespaceURI || ''

or 3 conditions

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