Branch Coverage

blib/lib/XML/Bare.pm
Criterion Covered Total %
branch 68 294 23.1


line true false branch
30 37 1 if ($$self{'text'}) { }
36 0 1 unless ($res)
49 11 27 unless wantarray
66 0 0 unless $ref
67 0 0 if ref $ref eq 'ARRAY'
75 0 0 $$_{$id} ? :
77 0 0 unless $$one{$id}
79 0 0 unless $short
81 0 0 if $key eq '_pos' or $key eq 'id'
84 0 0 if (not $cur) { }
87 0 0 if ($type eq 'HASH')
92 0 0 if (ref $add eq 'HASH') { }
110 0 0 if ($$ob{'save'})
111 0 0 if "$$ob{'save'}" ne '1'
123 9 0 unless ($ops{'keeproot'})
126 9 0 if $first
145 0 29 if (defined $$self{'scheme'})
148 0 29 if (defined $$self{'xbs'})
155 0 29 if ($res < 0)
158 0 29 if (defined $$self{'xbso'})
161 0 0 if $cres
174 0 0 if (ord $let == 10)
182 0 0 if ($$self{'offset'})
195 0 0 if (ref $scheme eq 'ARRAY') { }
198 0 0 unless $res
210 0 0 if substr($key, 0, 1) eq '_' or $key eq '_att' or $key eq 'comment'
211 0 0 if ($key eq 'value')
214 0 0 if ($regexp)
215 0 0 unless ($val =~ /^($regexp)$/)
224 0 0 unless ($ssub)
228 0 0 if (ref $sub eq 'HASH')
230 0 0 if $res
232 0 0 if (ref $sub eq 'ARRAY')
234 0 0 if (ref $asub eq 'ARRAY')
237 0 0 if ($$asub{'_t'})
239 0 0 if ($#$sub >= $max)
244 0 0 if ($#$sub + 1 < $min)
251 0 0 if $res
255 0 0 if (my $dem = $$scheme{'_demand'})
258 0 0 unless ($ck)
262 0 0 if (ref $ck eq 'ARRAY')
264 0 0 if $#$ck == -1
275 0 0 if substr($key, 0, 1) eq '_' or $key eq '_att' or $key eq 'comment'
276 0 0 if ($key eq 'value')
278 0 0 if $val =~ /^\W*$/
283 0 0 if ($key =~ /([a-z_]+)([^a-z_]+)/) { }
288 0 0 if ($t eq '+') { }
0 0 elsif ($t eq '*') { }
0 0 elsif ($t eq '?') { }
0 0 elsif ($t eq '@') { }
0 0 elsif ($t =~ /\{([0-9]+),([0-9]+)\}/) { }
312 0 0 if (ref $sub eq 'HASH')
318 0 0 if (ref $sub eq 'ARRAY')
327 0 0 if $min
332 0 0 if (ref $sub eq 'HASH')
338 0 0 if (ref $sub eq 'ARRAY')
350 0 0 if (@demand)
367 1 0 unless $$node{'multi_' . $name}
368 1 0 unless $$node{$name}
378 0 0 unless $$node{'multi_' . $name}
379 0 0 unless $$node{$name}
384 0 0 unless $$anode{'_pos'}
389 0 0 if $$anode{'_pos'} > $opos
404 0 0 if eval $cond
417 0 0 unless $node = $$node{$name}
418 0 0 unless $node
419 0 0 if (ref $node eq 'HASH')
422 0 0 unless $val
423 0 0 if ($$node{$key}{'value'} eq $val)
428 0 0 if (ref $node eq 'ARRAY')
433 0 0 unless defined $val
434 0 0 if ($$one{$key}{'value'} eq $val)
449 0 0 unless $node
454 0 0 if ($$one{$key}{'value'} eq $val)
470 0 0 if eval $cond
484 0 1 if (/^_/ or ref $val eq 'HASH') { }
502 0 0 if $name =~ /^_/ or $name eq 'comment' or $name eq 'value'
510 0 0 $_[0] ? :
516 0 1 unless $$self{'xml'}
525 0 1 unless $len
532 0 1 if ($cursize != $len)
538 0 1 if ($cursize != $len)
546 16 0 unless ($name)
559 0 0 if ($$self{'style'})
562 0 0 unless ($name)
574 16 62 unless $level
575 48 30 if $level <= 2
579 0 78 unless $objs
587 4 352 if ref $oba eq 'ARRAY'
588 3 353 if ref $obb eq 'ARRAY'
589 81 275 if (ref $oba eq 'HASH')
590 77 279 if (ref $obb eq 'HASH')
596 4 282 if ($type eq 'ARRAY') { }
64 218 elsif ($type eq 'HASH' and not $i =~ /^_/) { }
600 0 3 unless ($a)
601 0 3 unless ($b)
602 3 0 if (ref $a eq 'HASH' and ref $b eq 'HASH')
605 0 3 unless ($posa)
606 0 3 unless ($posb)
617 9 55 if ($$obj{'_att'}) { }
618 9 0 unless $i =~ /^_/
626 3 215 if ($i eq 'comment') { }
26 189 elsif ($i eq 'value') { }
189 0 elsif ($i =~ /^_/) { }
628 21 5 if ($level > 1)
629 2 19 if ($obj and $obj =~ /[<>&;]/) { }
630 14 5 if $obj =~ /\S/
637 32 46 $imm ? :
638 32 46 $imm ? :
639 78 0 if (substr($name, 0, 1) ne '_')
640 46 32 if ($name)
641 33 13 if ($xml) { }
648 46 32 if $level > 1
670 0 0 unless $level
671 0 0 if $level == 1
675 0 0 unless $objs
681 0 0 if ref $oba eq 'ARRAY'
682 0 0 if ref $obb eq 'ARRAY'
683 0 0 if (ref $oba eq 'HASH')
684 0 0 if (ref $obb eq 'HASH')
688 0 0 if ($$objs{'_cdata'})
703 0 0 if ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'HASH' and not $i =~ /^_/) { }
707 0 0 unless ($a)
708 0 0 unless ($b)
709 0 0 if (ref $a eq 'HASH' and ref $b eq 'HASH')
712 0 0 unless ($posa)
713 0 0 unless ($posb)
722 0 0 if ($$obj{'_att'}) { }
725 0 0 if ($val eq '') { }
726 0 0 unless $i =~ /^_/
729 0 0 unless $i =~ /^_/
738 0 0 if ($i eq 'comment') { }
0 0 elsif ($i eq 'value') { }
0 0 elsif ($i =~ /^_/) { }
740 0 0 if ($level > 1)
741 0 0 if ($obj and $obj =~ /[<>&;]/ and not $$objs{'_cdata'}) { }
742 0 0 if $obj =~ /\S/
749 0 0 if (substr($name, 0, 1) ne '_')
750 0 0 if ($name)
751 0 0 if ($imm) { }
752 0 0 if ($xml =~ /\S/) { }
760 0 0 if ($xml =~ /\S/) { }
767 0 0 if $$objs{'_br'}
768 0 0 if ($$objs{'_note'})
777 0 0 if $level
785 38 37 if ($$self{'structroot'})