Branch Coverage

blib/lib/XML/Stream/Parser.pm
Criterion Covered Total %
branch 65 108 60.1


line true false branch
86 6 7 unless exists $args{'nonblocking'}
91 7 6 exists $args{'sid'} ? :
93 11 2 exists $args{'style'} ? :
94 0 13 exists $args{'dtd'} ? :
98 6 7 if ($$self{'STYLE'} eq 'tree') { }
7 0 elsif ($$self{'STYLE'} eq 'node') { }
129 2010 0 if $_[1] > $_[0]{'DEBUGLEVEL'}
132 0 0 if $$self{'DEBUGFILE'} eq ''
134 0 0 if ($$self{'DEBUGTIME'} == 1)
175 0 17 unless defined $xml
176 4 13 if $xml eq ''
178 0 13 if ($$self{'XMLONHOLD'} ne '')
189 0 13 if $$self{'PARSING'} == 1
193 13 0 if (!$$self{'DOC'} == 1)
197 2 11 if (substr($$self{'XML'}, $start, 3) eq '
201 0 2 if ($close == -1)
215 3 1653 if (length $$self{'XML'} == 0)
222 1640 13 if $#{$$self{'CNAME'};} > -1
224 454 1199 if ($eclose == 0)
228 0 454 if $$self{'NONBLOCKING'} == 1
232 0 454 if $$self{'NONBLOCKING'} == 1
235 10 444 if ($$self{'CURR'} == 0)
247 499 700 if ($estart == 0 and $cdatastart != 0)
250 0 499 if ($close == -1)
256 42 457 $empty ? :
260 138 361 if ($nextspace != -1) { }
271 0 499 if ($$self{'DTD'} == 1 and exists $attribs{'xmlns'})
279 42 457 if ($empty == 1) { }
293 8 692 if ($cdatastart == 0)
296 0 8 if ($cdataclose == -1)
308 0 692 if ($estart == -1) { }
692 0 elsif ($cdatastart == -1 or $cdatastart > $estart) { }
327 361 138 unless defined $str
334 499 172 if (length $str == 0 or $eq == -1)
343 162 10 if ($id1 < $id2 and $id1 != -1 or $id2 == -1) { }
349 10 0 if ($id2 < $id1 and $id1 == -1 or $id2 != -1)
404 4 13 unless defined $clearData
408 8 9 if ($$self{'STYLE'} eq 'tree')
410 2 6 unless exists $$self{'SIDS'}{$sid}{'tree'}
412 2 4 if $clearData == 1
415 9 0 if ($$self{'STYLE'} eq 'node')
417 5 4 unless exists $$self{'SIDS'}{$sid}{'node'}
419 2 2 if $clearData == 1
442 0 0 unless $$self{'DOC'} == 1
444 0 0 if ($$self{'STYLE'} eq 'debug') { }
452 0 0 if ($#{$$self{'TREE'};} < 0) { }
471 0 0 unless $$self{'DOC'} == 1
473 0 0 if ($$self{'STYLE'} eq 'debug') { }
481 0 0 if $#{$$self{'TREE'};} == -1
485 0 0 if ($pos > 0 and $$self{'TREE'}[$pos - 1] eq '0') { }
503 0 0 unless $$self{'DOC'} == 1
505 0 0 if ($$self{'STYLE'} eq 'debug') { }
514 0 0 if ($#{$$self{'TREE'};} < 1) { }
518 0 0 if ($$self{'TREE'}[0] eq 'stream:error')