Branch Coverage

blib/lib/Mojo/DOM/HTML.pm
Criterion Covered Total %
branch 88 90 97.7


line true false branch
107 21 10660 if defined $runaway
108 2958 7723 if defined $text
111 3632 7049 if (defined $tag) { }
18 7031 elsif (defined $doctype) { }
14 7017 elsif (defined $comment) { }
7 7010 elsif (defined $cdata) { }
18 6992 elsif (defined $pi) { }
114 1591 2041 if ($tag =~ m[^/\s*(\S+)]u) { }
2041 0 elsif ($tag =~ m[^([^\s/]+)([\s\S]*)]u) { }
115 93 1498 $xml ? :
118 15 1576 if (not $xml and my $tags = $NO_MORE_CONTENT{$end})
125 112 1929 $xml ? :
130 47 34170 $xml ? :
133 64 34153 if $key eq "/"
135 34125 28 defined $value ? :
139 1 2040 if not $xml and $start eq "image"
143 173 1868 if not $xml and $EMPTY{$start} or $xml || !$BLOCK{$start} and $closing
146 1969 72 if $xml or not $RAW{$start} || $RCDATA{$start}
147 1 71 unless $html =~ m[\G(.*?))]cgisu
148 33 38 $RCDATA{$start} ? :
164 11 7 if not exists $self->{'xml'} and $pi =~ /xml/iu
186 484 4721 if $next->[0] eq "root"
189 3 4718 if $SCOPE{$next->[1]} and $next->[1] ne $end
192 1891 2827 if $next->[1] eq $end
195 6 2802 if not $xml and $PHRASING{$end} and not $PHRASING{$next->[1]}
211 1407 1087 if ($type eq "tag")
220 2 35 $xml ? :
37 1635 unless defined $value
225 461 25 $EMPTY{$tag} ? :
5 486 $xml ? :
491 916 unless $tree->[4]
236 545 542 if $type eq "text"
239 392 150 if $type eq "raw"
242 136 14 if $type eq "root"
245 4 10 if $type eq "doctype"
248 4 6 if $type eq "comment"
251 3 3 if $type eq "cdata"
254 3 0 if $type eq "pi"
264 1624 417 if (not $xml and $$current->[0] ne "root")
265 469 1155 if (my $end = $END{$start}) { }
595 560 elsif (my $close = $CLOSE{$start}) { }
273 50 390 if $$allowed{$parent->[1]}
289 388 125 ref $_[-1] eq 'CODE' ? :
513 452 if @_ % 2
293 960 5 unless exists $attrs->{'data'} and ref $attrs->{'data'} eq "HASH"