Branch Coverage

blib/lib/HTML/Acid.pm
Criterion Covered Total %
branch 75 76 98.6


line true false branch
57 1 3 unless ($tag_hierarchy)
61 1 3 unless ($url_regex)
108 16 29 ref $$tag_hierarchy{$tag} eq 'ARRAY' ? :
118 43 12 if (exists $$self{'_acid_depths'}{$p}) { }
120 35 8 if (not defined $depth) { }
0 8 elsif ($p_depth < $depth) { }
153 4 8 if ($$pending{$parent}) { }
165 25 8 unless exists $$pending{$parent}
176 112 6537 if ($$self{'_acid_br'} and $text_nontrivial)
182 60 6589 if ($self->_get_state eq '' and $text_nontrivial)
187 5002 1647 if ($$self{'_acid_text_manip'})
202 256 3717 if ($tagname eq 'br')
203 128 128 if $actual_state ne 'p'
204 8 120 if ($$self{'_acid_br'}) { }
218 454 3263 unless (exists $$self{'_acid_tag_hierarchy'}{$tagname}{$actual_state})
222 290 164 if ($actual_depth >= $required_depth)
225 170 284 if ($required_state ne '')
230 2578 1139 if (exists $START_HANDLERS{$tagname}) { }
240 3455 262 if $tagname ne 'img'
248 256 3771 if $tagname eq 'br'
253 432 3339 if ($tagname ne $actual_state)
256 316 116 if $tag_depth >= $actual_depth
260 2316 1139 if (exists $END_HANDLERS{$tagname}) { }
278 94 203 if ($self->_get_state ne '')
291 4 258 unless my $alt = $$attr{'alt'}
295 236 22 if ($src and $height and $width and my $title = $$attr{'title'}) { }
9 13 elsif ($$self{'_acid_text_manip'}) { }
12 1 elsif ($alt =~ /$ALT_REGEX/) { }
313 3 18 if ($$self{'_acid_text_container'}) { }
325 8 537 unless $url
326 25 512 unless $url =~ /$$self{'_acid_url_regex'}/
346 8 311 unless $text
347 24 287 unless $text =~ /\S/
349 17 270 unless ($href)
354 246 24 if ($$attr{'title'})
378 16 752 unless $text
379 712 40 exists $$attr{'id'} ? :
396 1184 45 if ($buffer->state =~ /\S/)