Branch Coverage

blib/lib/HTML/HTML5/Parser.pm
Criterion Covered Total %
branch 40 82 48.7


line true false branch
20 0 11 if 'XML::LibXML'->VERSION =~ /^1\.9[12]/
43 4 0 unless (&blessed($file) and $file->isa('URI'))
45 2 2 if ($file =~ /^[a-z][a-z0-9_\.\+-]+:\S+$/i) { }
53 0 0 unless $response->{'success'} or $opts->{'ignore_http_response_code'}
60 0 4 if ($c_type =~ /xml/i and not $opts->{'force_html'})
68 0 0 if -r $opts->{'xml_catalogue'}
102 708 0 if (defined $opts->{'encoding'} or 1) { }
105 2 706 if (utf8::is_utf8($text))
113 0 2147 if $errh
121 0 0 if $self->{'error_handler'}
175 0 12 unless $o
177 11 1 unless defined $options{'as'}
181 0 12 unless defined $ancestors
186 11 1 $n ? :
200 0 12 if ($options{'debug'})
202 0 0 if (exists &Test::More::diag) { }
216 11 1 unless ($options{'force_within'})
223 2 2 unless ($sibling->nodeName =~ /^(head|body)$/)
227 0 2 if $options{'mark_outliers'} and $sibling->can('setAttribute')
236 2 7 unless ($sibling->nodeName =~ /^(head|body)$/)
240 1 1 if $options{'mark_outliers'} and $sibling->can('setAttribute')
253 1 11 if (lc $options{'as'} eq 'list')
255 0 1 wantarray ? :
258 0 11 wantarray ? :
265 0 8 ref $_ eq 'HASH' ? :
267 0 4 if defined $URI
268 0 4 ref $class_or_self ? :
273 2 2 if (defined $args{'location'}) { }
1 1 elsif (defined $args{'string'}) { }
1 0 elsif (defined $args{'IO'}) { }
292 0 0 if &blessed($dom)
303 0 0 if ($func =~ /^( parse_chunk | start_push | push | finish_push )$/xi)
309 0 0 if ($func =~ /^( parse_balanced_chunk | parse_xml_chunk | process_?xincludes | get_last_error )$/xi)
316 0 0 if ($func =~ /^( recover | recover_silently | expand_entities | keep_blanks | no_network )$/xi)
320 0 0 if (not $set and defined $set)
328 0 0 if ($func =~ /^( validation | pedantic_parser | line_numbers load_ext_dtd | complete_attributes | expand_xinclude | load_catalog | base_uri | gdome_dom | clean_namespaces )$/xi)
333 0 0 if ($set and defined $set)
340 0 0 if length $func
346 0 0 if @_
401 0 10 ref $self ? :
405 9 1 if (wantarray) { }