Branch Coverage

blib/lib/XML/SAX/PurePerl.pm
Criterion Covered Total %
branch 97 160 60.6


line true false branch
95 0 22 if (defined $$self{'ParseOptions'}{'Source'}{'Encoding'}) { }
131 0 18 unless $self->element($reader)
135 0 15 unless $self->Misc($reader)
148 1 18 if ($self->doctypedecl($reader))
150 1 3 unless $self->Misc($reader)
158 0 455 unless $reader->match('<')
175 455 0 if ($have_namespaces)
177 4 1998 if ($k =~ /^xmlns(:(.*))?$/)
196 2002 0 if ($have_namespaces)
212 455 0 if ($self->get_feature('http://xml.org/sax/features/namespaces')) { }
224 9 445 if ($data =~ m[^/>]) { }
228 0 445 unless $data =~ /^>/
245 445 9 if ($have_content)
249 0 445 unless $data =~ m[^
252 0 445 unless $end_name eq $name
254 0 445 unless $reader->match('>')
277 445 501 if ($data =~ m[^
51 450 elsif ($data =~ /^&/) { }
14 436 elsif ($data =~ /^
0 436 elsif ($data =~ /^<\?/) { }
436 0 elsif ($data =~ /^
281 0 51 unless $self->Reference($reader)
285 14 0 if $self->CDSect($reader) or $self->Comment($reader)
291 0 0 if $self->PI($reader)
294 436 0 if $self->element($reader)
306 12 2 unless $data =~ /^
313 0 2 unless length $data
316 2 0 if ($data =~ /^(.*?)\]\]>/s) { }
338 0 954 unless length $data
340 946 8 if ($data =~ /^([^<&]*)[<&]/s) { }
342 0 946 if $chars =~ /\]\]>/
345 935 11 if length $chars
358 4 56 if ($self->Comment($reader)) { }
4 52 elsif ($self->PI($reader)) { }
32 20 elsif ($self->skip_whitespace($reader)) { }
374 0 51 unless $reader->match('&')
379 0 51 if ($data =~ /^(#\d*|#x[0-9a-fA-F]*)$/)
383 0 51 if ($data =~ /^#x([0-9a-fA-F]+);/) { }
0 51 elsif ($data =~ /^#([0-9]+);/) { }
387 0 0 unless $char =~ /$XML::SAX::PurePerl::SingleChar/o
396 0 0 unless $char =~ /$XML::SAX::PurePerl::SingleChar/o
405 0 51 unless $reader->match(';')
410 0 51 if ($self->_is_entity($name)) { }
51 0 elsif ($name =~ /^(?:amp|gt|lt|quot|apos)$/) { }
412 0 0 if ($self->_is_external($name)) { }
437 1 2 if ($name =~ /^#x([0-9a-fA-F]+)$/) { }
1 1 elsif ($name =~ /^#([0-9]+)$/) { }
439 0 1 unless $chr =~ /$XML::SAX::PurePerl::SingleChar/o
444 0 1 unless $chr =~ /$XML::SAX::PurePerl::SingleChar/o
448 0 1 if ($self->_is_entity($name)) { }
1 0 elsif ($name =~ /^(?:amp|lt|gt|quot|apos)$/) { }
449 0 0 if ($self->_is_external($name)) { }
476 0 0 if ($$self{'ParseOptions'}{'external_entities'}{$name})
485 0 52 if (exists $$self{'ParseOptions'}{'entities'}{$name})
494 0 0 if (exists $$self{'ParseOptions'}{'expanded_entity'}{$name})
503 0 0 unless $reader->move_along(length $data)
521 7442 2058 unless length $1
533 450 2007 unless $self->skip_whitespace($reader)
536 5 2002 if $data =~ m[^/?>]
538 2002 0 if (my $name = $self->Name($reader))
540 0 2002 unless $reader->match('=')
544 0 2002 unless ($self->cdata_attrib($name))
570 0 2007 unless length $data
572 2002 5 if ($data =~ /^([^$quote]*)$quote/) { }
583 0 2002 if ($value =~ /
597 17 56 if ($data =~ /^/s) { }
606 1 16 if $comment_str =~ /-$/
628 4 52 if ($data =~ /^<\?/)
635 2 2 if ($self->skip_whitespace($reader)) { }
638 0 2 unless length $data
640 2 0 if ($data =~ /^(.*?)\?>/s) { }
653 0 2 unless $data =~ /^\?>/
670 0 2962 unless length $data
671 0 2962 unless $data =~ m{^([^\s>/&\?;=<\)\(\[\],\%\#\!\*\|]*)}
675 2958 4 if $len != length $data
678 0 2958 unless length $name
680 0 2958 unless $name =~ /$XML::SAX::PurePerl::NameChar/o
690 0 2003 unless $data =~ /^(['"])/