Condition Coverage

blib/lib/HTML/DOM/_TreeBuilder.pm
Criterion Covered Total %
condition 96 243 39.5


and 3 conditions

line !l l&&!r l&&r condition
298 0 538 0 length $k and substr($k, 0, 1) eq '_'
337 594 0 0 $self->{'_p_strict'} and $HTML::DOM::_TreeBuilder::isKnown{$tag}
0 0 0 $self->{'_p_strict'} and $HTML::DOM::_TreeBuilder::isKnown{$tag} and not $HTML::Tagset::is_Possible_Strict_P_Content{$tag}
358 0 0 0 $HTML::DOM::_TreeBuilder::isKnown{$here_tag} and not $HTML::Tagset::is_Possible_Strict_P_Content{$here_tag}
436 85 0 345 $HTML::DOM::_TreeBuilder::isBodyElement{$ptag} and not $HTML::DOM::_TreeBuilder::isHeadOrBodyElement{$ptag}
550 141 0 0 $self->{'_ignore_formies_outside_form'} and not $pos->is_inside('form')
619 39 22 0 $ptag eq 'body' and $self->{'_implicit_body_p_tag'}
814 554 0 0 $self->{'_tighten'} and not $self->{'_ignore_text'}
817 0 0 0 $sibs = ($par = $self->{'_pos'} || $self)->{'_content'} and @$sibs
0 0 0 $sibs = ($par = $self->{'_pos'} || $self)->{'_content'} and @$sibs and not ref $sibs->[-1]
0 0 0 $sibs = ($par = $self->{'_pos'} || $self)->{'_content'} and @$sibs and not ref $sibs->[-1] and not $sibs->[-1] =~ /[^\n\r\f\t ]/s
0 0 0 $sibs = ($par = $self->{'_pos'} || $self)->{'_content'} and @$sibs and not ref $sibs->[-1] and not $sibs->[-1] =~ /[^\n\r\f\t ]/s and $HTML::DOM::_TreeBuilder::canTighten{$tag} || (@$sibs == 1 ? $HTML::DOM::_TreeBuilder::canTighten{$par->{'_tag'}} : ref $sibs->[-2] && $HTML::DOM::_TreeBuilder::canTighten{$sibs->[-2]{'_tag'}})
0 0 0 $sibs = ($par = $self->{'_pos'} || $self)->{'_content'} and @$sibs and not ref $sibs->[-1] and not $sibs->[-1] =~ /[^\n\r\f\t ]/s and $HTML::DOM::_TreeBuilder::canTighten{$tag} || (@$sibs == 1 ? $HTML::DOM::_TreeBuilder::canTighten{$par->{'_tag'}} : ref $sibs->[-2] && $HTML::DOM::_TreeBuilder::canTighten{$sibs->[-2]{'_tag'}}) and not $par->is_inside('pre', 'xmp', 'textarea', 'plaintext')
1192 0 315 217 $self->{'_implicit_tags'} && $text =~ /[^\n\r\f\t ]/
1462 0 0 0 defined $node and ref $node
0 0 0 defined $node and ref $node and $node->{'_implicit'}
0 0 0 defined $node and ref $node and $node->{'_implicit'} and $node->{'_parent'}
1476 124 0 0 $x->{'_tighten'} and not $x->{'_ignore_text'}
1558 0 0 0 defined $_ and ref $_
0 0 0 defined $_ and ref $_ and $_ ne $_[0]
1563 0 0 0 $_[0]{'_parent'} and $_[0]{'_parent'}{'_content'}
1582 0 7 2672 length $_ and substr($_, 0, 1) eq '_'
7 93 2579 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag'
100 93 2486 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent'
186 93 2393 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content'
186 82 2311 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content' and $_ ne '_implicit'
175 93 2218 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content' and $_ ne '_implicit' and $_ ne '_pos'
1637 0 0 0 @out == 1 and ref $out[0]

or 2 conditions

line l !l condition
364 0 0 $here->{'_parent'} || (last)
464 12 0 $self->{'_body'} || die(q[Where'd my body go?])
474 73 0 $self->{'_body'} || die(q[Where'd my body go?])
651 42 0 $self->{'_head'} || die(q[Where'd my head go?])
676 5 0 $self->{'_head'} || die(q[Where'd my head go?])
696 22 0 $self->{'_body'} || die(q[Where'd my body go?])
731 0 0 $self->{'_content'} || die('Contentless root?')
732 0 0 $self->{'_body'} || die(q[Where'd my BODY go?])
775 0 0 $self->{'_body'} || die(q[Where'd my body go?])
867 554 0 $self->{'_pos'} || ''
1065 434 27 $self->{'_pos'} || ''
1598 0 0 $_[0]{'_element_class'} || 'HTML::DOM::_Element'

or 3 conditions

line l !l&&r !l&&!r condition
135 0 147 0 ref $class || $class
273 460 134 0 $self->{'_pos'} || $self
367 0 0 0 $self->{'_pos'} || $self
481 121 1 371 $tag eq 'p' or $tag eq 'h1'
122 0 371 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2'
1 0 371 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3'
0 0 371 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3' or $tag eq 'h4'
0 0 371 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3' or $tag eq 'h4' or $tag eq 'h5'
0 0 371 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3' or $tag eq 'h4' or $tag eq 'h5' or $tag eq 'h6'
0 40 331 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3' or $tag eq 'h4' or $tag eq 'h5' or $tag eq 'h6' or $tag eq 'form'
0 2 329 $tag eq 'ol' or $tag eq 'ul'
2 0 329 $tag eq 'ol' or $tag eq 'ul' or $tag eq 'dl'
0 0 321 $tag eq 'dt' or $tag eq 'dd'
507 0 0 2 $ptag eq 'h1' or $ptag eq 'h2'
0 0 2 $ptag eq 'h1' or $ptag eq 'h2' or $ptag eq 'h3'
0 0 2 $ptag eq 'h1' or $ptag eq 'h2' or $ptag eq 'h3' or $ptag eq 'h4'
0 0 2 $ptag eq 'h1' or $ptag eq 'h2' or $ptag eq 'h3' or $ptag eq 'h4' or $ptag eq 'h5'
0 0 2 $ptag eq 'h1' or $ptag eq 'h2' or $ptag eq 'h3' or $ptag eq 'h4' or $ptag eq 'h5' or $ptag eq 'h6'
525 8 0 0 exists $HTML::DOM::_TreeBuilder::isList{$ptag} or $self->end(\'*', keys %HTML::DOM::_TreeBuilder::isList)
541 0 0 0 $ptag eq 'dl' or $self->end(\'*', 'dl')
564 45 0 0 $self->{'_pos'} || $self
565 45 0 0 $ptag eq 'select' or $ptag eq 'optgroup'
583 20 2 23 $tag eq 'td' or $tag eq 'th'
586 14 8 0 $ptag eq 'tr' or $self->end(\'*', 'tr', 'table')
717 0 0 0 $self->{'_frameset_seen'}++ or $self->{'_noframes_seen'}
0 0 0 $self->{'_frameset_seen'}++ or $self->{'_noframes_seen'} or $self->is_inside('body')
817 0 0 0 $self->{'_pos'} || $self
0 0 0 $HTML::DOM::_TreeBuilder::canTighten{$tag} || (@$sibs == 1 ? $HTML::DOM::_TreeBuilder::canTighten{$par->{'_tag'}} : ref $sibs->[-2] && $HTML::DOM::_TreeBuilder::canTighten{$sibs->[-2]{'_tag'}})
871 0 0 107 $$self{"_tweak_$tag"} or $self->{'_tweak_*'}
899 244 357 0 ref $tag or $tag =~ /^[-_a-zA-Z0-9:%]+$/s
916 597 4 0 $self->{'_pos'} || $self
1119 13 0 680 $$self{"_tweak_$ptag"} or $self->{'_tweak_*'}
1148 498 49 0 $self->{'_pos'} || $self
1153 0 12 535 $ignore_text or $is_cdata
12 1 534 $ignore_text or $is_cdata or $HTML::Tagset::isCDATA_Parent{$pos->{'_tag'}}
13 0 534 $ignore_text or $is_cdata or $HTML::Tagset::isCDATA_Parent{$pos->{'_tag'}} or $no_expand_entities
1179 13 2 532 $HTML::Tagset::isCDATA_Parent{$ptag = $pos->{'_tag'}} or $pos->is_inside('pre', 'textarea')
1192 2 0 215 $ptag eq 'head' or $ptag eq 'noframes'
1313 5 2 0 $self->{'_pos'} || $self
1316 7 0 0 $self->{'_store_comments'} or $HTML::Tagset::isCDATA_Parent{$pos->{'_tag'}}
1338 0 0 7 $self->{'_tweak_~comment'} or $self->{'_tweak_*'}
1350 0 0 0 $self->{'_pos'} || $self
1381 0 0 0 $self->{'_pos'} || $self
1401 0 0 0 $self->{'_tweak_~pi'} or $self->{'_tweak_*'}
1447 103 22 0 $x->{'_pos'} || $x