Branch Coverage

blib/lib/Mojo/DOM58/_HTML.pm
Criterion Covered Total %
branch 101 104 97.1


line true false branch
110 66 0 @_ > 1 ? :
66 2128 @_ ? :
119 2847 5 exists $self->{'tree'} ? :
2852 2203 unless @_
126 1689 1980 unless @_
141 7 4352 if defined $runaway
142 1097 3262 if defined $text
145 1468 2891 if (defined $tag) { }
12 2879 elsif (defined $doctype) { }
10 2869 elsif (defined $comment) { }
7 2862 elsif (defined $cdata) { }
18 2844 elsif (defined $pi) { }
148 605 863 if ($tag =~ m[^/\s*(\S+)]) { }
863 0 elsif ($tag =~ m[^([^\s/]+)([\s\S]*)]) { }
149 83 522 $xml ? :
152 11 594 if (not $xml and my $tags = $NO_MORE_CONTENT{$end})
154 83 522 $xml ? :
159 103 760 $xml ? :
164 45 33057 $xml ? :
165 16 32886 defined $3 ? :
200 32902 defined $2 ? :
168 44 33058 if $key eq '/'
170 33030 28 defined $value ? :
174 1 862 if not $xml and $start eq 'image'
179 74 789 if not $xml and $EMPTY{$start} or $xml || !$BLOCK{$start} and $closing
182 823 40 if $xml or not $RAW{$start} || $RCDATA{$start}
183 1 39 unless $html =~ m[\G(.*?)<\s*/\s*\Q$start\E\s*>]cgis
184 25 14 $RCDATA{$start} ? :
200 11 7 if not exists $self->{'xml'} and $pi =~ /xml/i
218 157 1145 if $next->[0] eq 'root'
221 777 368 if $next->[1] eq $end
224 4 346 if not $xml and $PHRASING{$end} and not $PHRASING{$next->[1]}
240 434 547 if ($type eq 'tag')
249 2 8 $xml ? :
10 54 unless defined $value
255 17 18 $EMPTY{$tag} ? :
5 35 $xml ? :
40 394 unless $tree->[4]
267 403 144 if $type eq 'text'
270 6 138 if $type eq 'raw'
273 124 14 if $type eq 'root'
277 4 10 if $type eq 'doctype'
280 4 6 if $type eq 'comment'
283 3 3 if $type eq 'cdata'
286 3 0 if $type eq 'pi'
296 557 306 if (not $xml and $$current->[0] ne 'root')
297 148 409 if (my $end = $END{$start}) { }
146 263 elsif (my $close = $CLOSE{$start}) { }
305 50 97 if $$allowed{$parent->[1]}
321 2 4 ref $_[-1] eq 'CODE' ? :
6 6 if @_ % 2
326 11 1 unless exists $attrs->{'data'} and ref $attrs->{'data'} eq 'HASH'