Branch Coverage

blib/lib/XML/Stream/Tree.pm
Criterion Covered Total %
branch 93 148 62.8


line true false branch
95 124 116 if ref $_[0] eq 'XML::Stream::Parser'
96 116 124 unless ref $_[0] eq 'XML::Stream::Parser'
103 38 202 if ($#{$$self{'SIDS'}{$sid}{'tree'};} < 0) { }
126 176 172 if ref $_[0] eq 'XML::Stream::Parser'
127 172 176 unless ref $_[0] eq 'XML::Stream::Parser'
133 36 312 if $#{$$self{'SIDS'}{$sid}{'tree'};} == -1
140 0 312 if ($pos > 0 and $$self{'SIDS'}{$sid}{'tree'}[$pos - 1] eq '0') { }
164 124 118 if ref $_[0] eq 'XML::Stream::Parser'
165 118 124 unless ref $_[0] eq 'XML::Stream::Parser'
175 2 240 if ($#{$$self{'SIDS'}{$sid}{'tree'};} == -1)
177 0 2 if ($$self{'SIDS'}{$sid}{'rootTag'} ne $tag)
184 38 202 if ($#{$$self{'SIDS'}{$sid}{'tree'};} < 1) { }
189 34 4 if (ref $self ne 'XML::Stream::Parser')
193 0 34 if (defined $$self{'SIDS'}{$sid}{'tree'}[0] and $$self{'SIDS'}{$sid}{'tree'}[0] =~ /^$stream_prefix\:/) { }
210 0 34 if ($#special > -1) { }
214 0 0 if $xmlns eq &XML::Stream::ConstXMLNS('xmpp-sasl')
216 0 0 if $xmlns eq &XML::Stream::ConstXMLNS('xmpp-tls')
256 0 0 if ($tag ne '') { }
258 0 0 if ($type eq 'single')
263 0 0 if ($$XMLTree[1][$child] eq $tag)
265 0 0 if ($data ne '')
285 0 0 if ($data ne '')
297 0 0 if ($data ne '')
299 0 0 if ($#{$$XMLTree[1];} > 0 and $$XMLTree[1][$#{$$XMLTree[1];} - 1] eq '0') { }
359 444 429 unless defined $tag
360 765 108 unless defined $attrib
361 873 0 unless defined $value
368 321 552 if ($tag ne '') { }
374 1806 1810 unless ($child / 2) =~ /\./
375 1175 635 if ($$XMLTree[1][$child] eq $tag or $tag eq '*')
377 0 1175 if ref $$XMLTree[1][$child] eq 'ARRAY'
382 0 0 if $value ne '' and $attrib ne '' and exists $$XMLTree[1][$child + 1][0]{$attrib} and $$XMLTree[1][$child + 1][0]{$attrib} ne $value
383 0 0 if $attrib ne '' and ref $$XMLTree[1][$child + 1] ne 'ARRAY' || !exists($$XMLTree[1][$child + 1][0]{$attrib})
388 0 1175 if ($type eq 'existence')
397 4 1171 if ($type eq 'value')
399 4 0 if ($attrib eq '')
405 4 4 if ($next == 1)
406 4 0 if ($$XMLTree[1][$child + 1][$index] eq '0')
413 0 0 if exists $$XMLTree[1][$child + 1][0]{$attrib}
420 0 1171 if ($type eq 'value array')
422 0 0 if ($attrib eq '') { }
429 0 0 if ($next == 1)
430 0 0 if ($$XMLTree[1][$child + 1][$index] eq '0')
440 0 0 if exists $$XMLTree[1][$child + 1][0]{$attrib}
448 0 1171 if ($type eq 'tree')
457 144 1027 if ($type eq 'tree array')
465 108 1063 if ($type eq 'count')
467 0 108 if ($$XMLTree[1][$child] eq '0')
472 0 108 if ($skipthis == 1)
482 919 252 if ($type eq 'child array')
485 405 514 if $tree[0] ne '0'
490 0 1171 if ($type eq 'attribs')
499 200 58 if ($type eq 'tree array' or $type eq 'value array' or $type eq 'child array')
508 58 0 if ($type eq 'count')
523 125 427 if ($type eq 'value')
525 17 108 if ($attrib eq '')
532 18 20 if ($next == 1)
533 18 2 if ($$XMLTree[1][$index] eq '0')
541 30 78 if exists $$XMLTree[1][0]{$attrib}
548 0 505 if ($type eq 'tree')
557 0 505 if ($type eq 'existence')
559 0 0 if $attrib ne '' and exists $$XMLTree[1][0]{$attrib}
565 1 504 if ($type eq 'attribs')
572 426 78 if ($type eq 'tag')
581 0 78 if $type eq 'existence'
582 78 0 if $type eq 'value'
597 0 126 if $#{$parseTree;} == -1
600 126 0 if (ref $$parseTree[0] eq '')
602 68 58 if ($$parseTree[0] eq '0')
613 54 4 if ($#{$$parseTree[1];} > 0 or defined $rawXML and $rawXML ne '') { }
625 17 37 if defined $rawXML
668 86 58 if ($$tree[0] eq '0') { }
670 23 63 unless $$tree[1] =~ /^\s*$/
674 20 38 if (&XML::Stream::GetXMLData('count', $XMLTree, $$tree[0]) > 1) { }