Condition Coverage

blib/lib/HTML/TreeBuilder.pm
Criterion Covered Total %
condition 124 255 48.6


and 3 conditions

line !l l&&!r l&&r condition
406 1233 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 1214 0 0 $self->{'_p_strict'} and $HTML::TreeBuilder::isKnown{$tag}
0 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 273 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 367 0 $ptag eq 'body' and $self->{'_implicit_body_p_tag'}
970 9 0 1178 $self->{'_tighten'} and not $self->{'_ignore_text'}
973 530 0 648 $sibs = ($par = $self->{'_pos'} || $self)->{'_content'} and @$sibs
530 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 1440 $self->{'_implicit_tags'} && $text =~ /[^\n\r\f\t ]/
1621 0 0 18 defined $node and ref $node
0 18 0 defined $node and ref $node and $node->{'_implicit'}
0 18 0 defined $node and ref $node and $node->{'_implicit'} and $node->{'_parent'}
1635 5 0 368 $x->{'_tighten'} and not $x->{'_ignore_text'}
1717 0 0 540 defined $_ and ref $_
0 0 540 defined $_ and ref $_ and $_ ne $_[0]
1722 270 0 0 $_[0]{'_parent'} and $_[0]{'_parent'}{'_content'}
1741 0 0 621 length $_ and substr($_, 0, 1) eq '_'
0 27 594 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag'
27 0 594 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent'
27 27 567 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content'
27 27 540 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content' and $_ ne '_implicit'
54 27 513 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content' and $_ ne '_implicit' and $_ ne '_pos'
54 0 513 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'
521 0 0 $here->{'_parent'} || (last)
621 169 0 $self->{'_body'} || die(q[Where'd my body go?])
631 104 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 1187 0 $self->{'_pos'} || ''
1224 1049 347 $self->{'_pos'} || ''
1758 0 4258 $_[0]{'_element_class'} || 'HTML::Element'

or 3 conditions

line l !l&&r !l&&!r condition
252 0 379 0 ref $class || $class
430 902 350 0 $self->{'_pos'} || $self
524 0 0 0 $self->{'_pos'} || $self
638 135 169 639 $tag eq 'p' or $tag eq 'h1'
304 1 638 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2'
170 1 637 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3'
2 0 637 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3' or $tag eq 'h4'
1 0 637 $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 637 $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 636 $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 627 $tag eq 'ol' or $tag eq 'ul'
9 0 627 $tag eq 'ol' or $tag eq 'ul' or $tag eq 'dl'
0 0 615 $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 1163 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'}})
1030 0 0 51 $$self{"_tweak_$tag"} or $self->{'_tweak_*'}
1058 415 1299 0 ref $tag or $tag =~ /^[-_a-zA-Z0-9:%]+$/s
1075 1694 20 0 $self->{'_pos'} || $self
1278 0 0 1885 $$self{"_tweak_$ptag"} or $self->{'_tweak_*'}
1307 2274 313 0 $self->{'_pos'} || $self
1312 0 0 2587 $ignore_text or $is_cdata
0 0 2587 $ignore_text or $is_cdata or $HTML::Tagset::isCDATA_Parent{$pos->{'_tag'}}
0 2 2585 $ignore_text or $is_cdata or $HTML::Tagset::isCDATA_Parent{$pos->{'_tag'}} or $no_expand_entities
1338 0 0 2587 $HTML::Tagset::isCDATA_Parent{$ptag = $pos->{'_tag'}} or $pos->is_inside('pre', 'textarea')
1351 0 0 1440 $ptag eq 'head' or $ptag eq 'noframes'
1472 191 4 0 $self->{'_pos'} || $self
1475 1 0 194 $self->{'_store_comments'} or $HTML::Tagset::isCDATA_Parent{$pos->{'_tag'}}
1497 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 327 46 0 $x->{'_pos'} || $x