Condition Coverage

blib/lib/HTML/TreeBuilder.pm
Criterion Covered Total %
condition 126 255 49.4


and 3 conditions

line !l l&&!r l&&r condition
406 1209 11 8 $$self{'_self_closed_tags'} && $_[4] =~ m[/[\n\r\f\t ]*>\z]
455 0 597 0 length $k and substr($k, 0, 1) eq '_'
494 1190 0 0 $$self{'_p_strict'} and $HTML::TreeBuilder::isKnown{$tag}
1190 0 0 $$self{'_p_strict'} and $HTML::TreeBuilder::isKnown{$tag} and not $HTML::Tagset::is_Possible_Strict_P_Content{$tag}
515 0 0 0 $HTML::TreeBuilder::isKnown{$here_tag} and not $HTML::Tagset::is_Possible_Strict_P_Content{$here_tag}
593 249 0 258 $HTML::TreeBuilder::isBodyElement{$ptag} and not $HTML::TreeBuilder::isHeadOrBodyElement{$ptag}
707 1 0 0 $$self{'_ignore_formies_outside_form'} and not $pos->is_inside('form')
776 20 350 1 $ptag eq 'body' and $$self{'_implicit_body_p_tag'}
970 9 0 1154 $$self{'_tighten'} and not $$self{'_ignore_text'}
973 506 0 648 $sibs = ($par = $$self{'_pos'} || $self)->{'_content'} and @$sibs
506 153 495 $sibs = ($par = $$self{'_pos'} || $self)->{'_content'} and @$sibs and not ref $$sibs[-1]
153 196 299 $sibs = ($par = $$self{'_pos'} || $self)->{'_content'} and @$sibs and not ref $$sibs[-1] and not $$sibs[-1] =~ /[^\n\r\f\t ]/s
349 299 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::TreeBuilder::canTighten{$tag} || (@$sibs == 1 ? $HTML::TreeBuilder::canTighten{$$par{'_tag'}} : ref $$sibs[-2] && $HTML::TreeBuilder::canTighten{$$sibs[-2]{'_tag'}})
168 0 131 $sibs = ($par = $$self{'_pos'} || $self)->{'_content'} and @$sibs and not ref $$sibs[-1] and not $$sibs[-1] =~ /[^\n\r\f\t ]/s and $HTML::TreeBuilder::canTighten{$tag} || (@$sibs == 1 ? $HTML::TreeBuilder::canTighten{$$par{'_tag'}} : ref $$sibs[-2] && $HTML::TreeBuilder::canTighten{$$sibs[-2]{'_tag'}}) and not $par->is_inside('pre', 'xmp', 'textarea', 'plaintext')
1351 26 1121 1376 $$self{'_implicit_tags'} && $text =~ /[^\n\r\f\t ]/
1617 0 0 18 defined $node and ref $node
0 0 18 defined $node and ref $node and $$node{'_implicit'}
0 0 18 defined $node and ref $node and $$node{'_implicit'} and $$node{'_parent'}
1635 5 0 304 $$x{'_tighten'} and not $$x{'_ignore_text'}
1717 0 0 500 defined $_ and ref $_
0 0 500 defined $_ and ref $_ and $_ ne $_[0]
1722 250 0 0 $_[0]{'_parent'} and $_[0]{'_parent'}{'_content'}
1741 0 0 69 length $_ and substr($_, 0, 1) eq '_'
0 3 66 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag'
3 0 66 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent'
3 3 63 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content'
3 3 60 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content' and $_ ne '_implicit'
6 3 57 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content' and $_ ne '_implicit' and $_ ne '_pos'
6 0 57 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content' and $_ ne '_implicit' and $_ ne '_pos' and $_ ne '_element_class'
1797 0 0 0 @out == 1 and ref $out[0]

or 2 conditions

line l !l condition
170 0 0 $opt{'encoding'} || 'none'
175 3 0 $message->content_charset || 'cp1252'
357 0 0 $@ || 'UNKNOWN ERROR'
520 0 0 $$here{'_parent'} || (last)
617 169 0 $$self{'_body'} || die(q[Where'd my body go?])
627 80 0 $$self{'_body'} || die(q[Where'd my body go?])
808 204 0 $$self{'_head'} || die(q[Where'd my head go?])
833 22 0 $$self{'_head'} || die(q[Where'd my head go?])
853 22 0 $$self{'_body'} || die(q[Where'd my body go?])
887 0 0 $$self{'_content'} || die('Contentless root?')
888 0 0 $$self{'_body'} || die(q[Where'd my BODY go?])
931 0 0 $$self{'_body'} || die(q[Where'd my body go?])
1026 1163 0 $$self{'_pos'} || ''
1224 1033 291 $$self{'_pos'} || ''
1758 0 4066 $_[0]{'_element_class'} || 'HTML::Element'

or 3 conditions

line l !l&&r !l&&!r condition
252 0 315 0 ref $class || $class
430 902 326 0 $$self{'_pos'} || $self
523 0 0 0 $$self{'_pos'} || $self
638 135 169 615 $tag eq 'p' or $tag eq 'h1'
304 1 614 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2'
170 1 613 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3'
2 0 613 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3' or $tag eq 'h4'
1 0 613 $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 613 $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 1 612 $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 9 603 $tag eq 'ol' or $tag eq 'ul'
9 0 603 $tag eq 'ol' or $tag eq 'ul' or $tag eq 'dl'
0 0 591 $tag eq 'dt' or $tag eq 'dd'
664 0 0 9 $ptag eq 'h1' or $ptag eq 'h2'
0 0 9 $ptag eq 'h1' or $ptag eq 'h2' or $ptag eq 'h3'
0 0 9 $ptag eq 'h1' or $ptag eq 'h2' or $ptag eq 'h3' or $ptag eq 'h4'
0 0 9 $ptag eq 'h1' or $ptag eq 'h2' or $ptag eq 'h3' or $ptag eq 'h4' or $ptag eq 'h5'
0 0 9 $ptag eq 'h1' or $ptag eq 'h2' or $ptag eq 'h3' or $ptag eq 'h4' or $ptag eq 'h5' or $ptag eq 'h6'
682 10 2 0 exists $HTML::TreeBuilder::isList{$ptag} or $self->end(\'*', keys %HTML::TreeBuilder::isList)
698 0 0 0 $ptag eq 'dl' or $self->end(\'*', 'dl')
721 0 0 0 $$self{'_pos'} || $self
722 0 0 0 $ptag eq 'select' or $ptag eq 'optgroup'
740 94 17 67 $tag eq 'td' or $tag eq 'th'
743 72 37 2 $ptag eq 'tr' or $self->end(\'*', 'tr', 'table')
873 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')
973 1139 15 0 $$self{'_pos'} || $self
127 0 172 $HTML::TreeBuilder::canTighten{$tag} || (@$sibs == 1 ? $HTML::TreeBuilder::canTighten{$$par{'_tag'}} : ref $$sibs[-2] && $HTML::TreeBuilder::canTighten{$$sibs[-2]{'_tag'}})
1029 0 0 43 $$self{"_tweak_$tag"} or $$self{'_tweak_*'}
1058 415 1219 0 ref $tag or $tag =~ /^[-_a-zA-Z0-9:%]+$/s
1075 1614 20 0 $$self{'_pos'} || $self
1277 0 0 1741 $$self{"_tweak_$ptag"} or $$self{'_tweak_*'}
1307 2242 281 0 $$self{'_pos'} || $self
1309 0 0 2523 $ignore_text or $is_cdata
0 0 2523 $ignore_text or $is_cdata or $HTML::Tagset::isCDATA_Parent{$$pos{'_tag'}}
0 2 2521 $ignore_text or $is_cdata or $HTML::Tagset::isCDATA_Parent{$$pos{'_tag'}} or $no_expand_entities
1338 0 0 2523 $HTML::Tagset::isCDATA_Parent{$ptag = $$pos{'_tag'}} or $pos->is_inside('pre', 'textarea')
1351 0 0 1376 $ptag eq 'head' or $ptag eq 'noframes'
1472 191 4 0 $$self{'_pos'} || $self
1474 1 0 194 $$self{'_store_comments'} or $HTML::Tagset::isCDATA_Parent{$$pos{'_tag'}}
1496 0 0 1 $$self{'_tweak_~comment'} or $$self{'_tweak_*'}
1509 0 17 0 $$self{'_pos'} || $self
1540 0 0 0 $$self{'_pos'} || $self
1560 0 0 0 $$self{'_tweak_~pi'} or $$self{'_tweak_*'}
1606 271 38 0 $$x{'_pos'} || $x