Condition Coverage

blib/lib/HTML/TreeBuilder.pm
Criterion Covered Total %
condition 115 243 47.3


and 3 conditions

line !l l&&!r l&&r condition
326 0 503 0 length $k and substr($k, 0, 1) eq '_'
365 983 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}
386 0 0 0 $HTML::TreeBuilder::isKnown{$here_tag} and not $HTML::Tagset::is_Possible_Strict_P_Content{$here_tag}
464 241 0 206 $HTML::TreeBuilder::isBodyElement{$ptag} and not $HTML::TreeBuilder::isHeadOrBodyElement{$ptag}
578 1 0 0 $self->{'_ignore_formies_outside_form'} and not $pos->is_inside('form')
647 4 342 1 $ptag eq 'body' and $self->{'_implicit_body_p_tag'}
841 9 0 980 $self->{'_tighten'} and not $self->{'_ignore_text'}
844 477 0 503 $sibs = +($par = $self->{'_pos'} || $self)->{'_content'} and @$sibs
477 123 380 $sibs = +($par = $self->{'_pos'} || $self)->{'_content'} and @$sibs and not ref $sibs->[-1]
123 183 197 $sibs = +($par = $self->{'_pos'} || $self)->{'_content'} and @$sibs and not ref $sibs->[-1] and not $sibs->[-1] =~ /[^\n\r\f\t ]/s
306 163 34 $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'}})
163 0 34 $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')
1218 9 886 1257 $self->{'_implicit_tags'} && $text =~ /[^\n\r\f\t ]/
1485 0 0 10 defined $node and ref $node
0 0 10 defined $node and ref $node and $node->{'_implicit'}
0 0 10 defined $node and ref $node and $node->{'_implicit'} and $node->{'_parent'}
1499 5 0 278 $x->{'_tighten'} and not $x->{'_ignore_text'}
1581 0 0 500 defined $_ and ref $_
0 0 500 defined $_ and ref $_ and $_ ne $_[0]
1586 250 0 0 $_[0]{'_parent'} and $_[0]{'_parent'}{'_content'}
1605 0 0 63 length $_ and substr($_, 0, 1) eq '_'
0 3 60 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag'
3 0 60 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent'
3 3 57 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content'
3 3 54 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content' and $_ ne '_implicit'
6 3 51 length $_ and substr($_, 0, 1) eq '_' and $_ ne '_tag' and $_ ne '_parent' and $_ ne '_content' and $_ ne '_implicit' and $_ ne '_pos'
1660 0 0 0 @out == 1 and ref $out[0]

or 2 conditions

line l !l condition
392 0 0 $here->{'_parent'} || (last)
492 164 0 $self->{'_body'} || die(q[Where'd my body go?])
502 77 0 $self->{'_body'} || die(q[Where'd my body go?])
679 167 0 $self->{'_head'} || die(q[Where'd my head go?])
704 6 0 $self->{'_head'} || die(q[Where'd my head go?])
724 6 0 $self->{'_body'} || die(q[Where'd my body go?])
758 0 0 $self->{'_content'} || die('Contentless root?')
759 0 0 $self->{'_body'} || die(q[Where'd my BODY go?])
802 0 0 $self->{'_body'} || die(q[Where'd my body go?])
894 989 0 $self->{'_pos'} || ''
1092 883 267 $self->{'_pos'} || ''
1621 0 3780 $_[0]{'_element_class'} || 'HTML::Element'

or 3 conditions

line l !l&&r !l&&!r condition
163 0 291 0 ref $class || $class
301 739 266 0 $self->{'_pos'} || $self
395 0 0 0 $self->{'_pos'} || $self
509 80 163 556 $tag eq 'p' or $tag eq 'h1'
243 0 556 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2'
163 0 556 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3'
0 0 556 $tag eq 'p' or $tag eq 'h1' or $tag eq 'h2' or $tag eq 'h3' or $tag eq 'h4'
0 0 556 $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 556 $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 0 556 $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 547 $tag eq 'ol' or $tag eq 'ul'
9 0 547 $tag eq 'ol' or $tag eq 'ul' or $tag eq 'dl'
0 0 535 $tag eq 'dt' or $tag eq 'dd'
535 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'
553 10 2 0 exists $HTML::TreeBuilder::isList{$ptag} or $self->end(\'*', keys %HTML::TreeBuilder::isList)
569 0 0 0 $ptag eq 'dl' or $self->end(\'*', 'dl')
592 0 0 0 $self->{'_pos'} || $self
593 0 0 0 $ptag eq 'select' or $ptag eq 'optgroup'
611 82 14 58 $tag eq 'td' or $tag eq 'th'
614 63 31 2 $ptag eq 'tr' or $self->end(\'*', 'tr', 'table')
744 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')
844 970 10 0 $self->{'_pos'} || $self
34 0 163 $HTML::TreeBuilder::canTighten{$tag} || (@$sibs == 1 ? $HTML::TreeBuilder::canTighten{$par->{'_tag'}} : ref $sibs->[-2] && $HTML::TreeBuilder::canTighten{$sibs->[-2]{'_tag'}})
898 0 0 15 $$self{"_tweak_$tag"} or $self->{'_tweak_*'}
926 336 1064 0 ref $tag or $tag =~ /^[-_a-zA-Z0-9:%]+$/s
943 1396 4 0 $self->{'_pos'} || $self
1146 0 0 1535 $$self{"_tweak_$ptag"} or $self->{'_tweak_*'}
1175 1954 198 0 $self->{'_pos'} || $self
1180 0 0 2152 $ignore_text or $is_cdata
0 0 2152 $ignore_text or $is_cdata or $HTML::Tagset::isCDATA_Parent{$pos->{'_tag'}}
0 2 2150 $ignore_text or $is_cdata or $HTML::Tagset::isCDATA_Parent{$pos->{'_tag'}} or $no_expand_entities
1205 0 0 2152 $HTML::Tagset::isCDATA_Parent{$ptag = $pos->{'_tag'}} or $pos->is_inside('pre', 'textarea')
1218 0 0 1257 $ptag eq 'head' or $ptag eq 'noframes'
1339 184 4 0 $self->{'_pos'} || $self
1342 1 0 187 $self->{'_store_comments'} or $HTML::Tagset::isCDATA_Parent{$pos->{'_tag'}}
1363 0 0 1 $self->{'_tweak_~comment'} or $self->{'_tweak_*'}
1375 0 2 0 $self->{'_pos'} || $self
1405 0 0 0 $self->{'_pos'} || $self
1424 0 0 0 $self->{'_tweak_~pi'} or $self->{'_tweak_*'}
1470 263 20 0 $x->{'_pos'} || $x