Branch Coverage

blib/lib/XML/Stream/Parser.pm
Criterion Covered Total %
branch 64 108 59.2


line true false branch
86 4 7 unless exists $args{'nonblocking'}
91 7 4 exists $args{'sid'} ? :
93 11 0 exists $args{'style'} ? :
94 0 11 exists $args{'dtd'} ? :
98 4 7 if ($$self{'STYLE'} eq 'tree') { }
7 0 elsif ($$self{'STYLE'} eq 'node') { }
129 1976 0 if $_[1] > $_[0]{'DEBUGLEVEL'}
132 0 0 if $$self{'DEBUGFILE'} eq ''
134 0 0 if ($$self{'DEBUGTIME'} == 1)
175 0 15 unless defined $xml
176 4 11 if $xml eq ''
178 0 11 if ($$self{'XMLONHOLD'} ne '')
189 0 11 if $$self{'PARSING'} == 1
193 11 0 if (!$$self{'DOC'} == 1)
197 2 9 if (substr($$self{'XML'}, $start, 3) eq '
201 0 2 if ($close == -1)
215 3 1635 if (length $$self{'XML'} == 0)
222 1624 11 if $#{$$self{'CNAME'};} > -1
224 447 1188 if ($eclose == 0)
228 0 447 if $$self{'NONBLOCKING'} == 1
232 0 447 if $$self{'NONBLOCKING'} == 1
235 8 439 if ($$self{'CURR'} == 0)
247 492 696 if ($estart == 0 and $cdatastart != 0)
250 0 492 if ($close == -1)
256 42 450 $empty ? :
260 136 356 if ($nextspace != -1) { }
271 0 492 if ($$self{'DTD'} == 1 and exists $attribs{'xmlns'})
279 42 450 if ($empty == 1) { }
293 8 688 if ($cdatastart == 0)
296 0 8 if ($cdataclose == -1)
308 0 688 if ($estart == -1) { }
688 0 elsif ($cdatastart == -1 or $cdatastart > $estart) { }
327 356 136 unless defined $str
334 492 166 if (length $str == 0 or $eq == -1)
343 159 7 if ($id1 < $id2 and $id1 != -1 or $id2 == -1) { }
349 7 0 if ($id2 < $id1 and $id1 == -1 or $id2 != -1)
404 4 11 unless defined $clearData
408 6 9 if ($$self{'STYLE'} eq 'tree')
410 2 4 unless exists $$self{'SIDS'}{$sid}{'tree'}
412 2 2 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')