Condition Coverage

blib/lib/HTML/DOM/_Element.pm
Criterion Covered Total %
condition 119 410 29.0


and 3 conditions

line !l l&&!r l&&r condition
108 0 0 2153 defined $tag and length $tag
155 7 0 0 defined $_[0] and ref $_[0]
7 0 0 defined $_[0] and ref $_[0] and $self eq $_[0]
192 0 0 0 defined $parm and $parm ne $self
220 0 0 0 length $_ && substr($_, 0, 1) eq '_'
225 0 54 200 length $_ && substr($_, 0, 1) eq '_'
261 0 0 0 defined($x = $_[0]{'id'}) and length $x
297 298 250 0 @$content and not ref $content->[-1]
328 0 0 0 @$content and not ref $content->[0]
381 0 224 120 ref $_ && $_ eq $self
402 0 0 41 $parent_content and @$parent_content
431 0 36 41 ref $_ && $_ eq $self
459 0 0 0 $parent_content and @$parent_content
463 0 0 0 ref $_ && $_ eq $self
503 156 1 19 $self->{'_content'} and @{$self->{'_content'};}
505 109 61 6 $self->{'_parent'} and $self->{'_parent'}{'_content'}
525 185 0 137 $it->{'_content'} and @{$it->{'_content'};}
552 0 0 0 $c = $start->{'_content'} and ref $c
0 0 0 $c = $start->{'_content'} and ref $c and @$c
561 0 0 0 defined $c->[$i] and ref $c->[$i]
595 0 0 0 $s and $s->[1] > 1
639 0 0 0 $sibs = $this->{'_content'} and @$sibs
666 0 0 0 ref $sibs->[1] and $HTML::DOM::_Element::canTighten{$sibs->[1]{'_tag'}}
676 0 0 0 ref $$sibs[$i - 1] and $HTML::DOM::_Element::canTighten{$$sibs[$i - 1]{'_tag'}}
696 0 0 0 ref $$sibs[$i - 1] and ref $$sibs[$i + 1]
0 0 0 ref $$sibs[$i - 1] and ref $$sibs[$i + 1] and not $HTML::DOM::_Element::canTighten{$$sibs[$i - 1]{'_tag'}}
0 0 0 ref $$sibs[$i - 1] and ref $$sibs[$i + 1] and not $HTML::DOM::_Element::canTighten{$$sibs[$i - 1]{'_tag'}} and not $HTML::DOM::_Element::canTighten{$$sibs[$i + 1]{'_tag'}}
818 77 0 0 defined $indent and length $indent
833 0 0 0 $this_tag_tightenable = $HTML::DOM::_Element::canTighten{$tag} and not $nonindentable_ancestors
0 0 0 $this_tag_tightenable = $HTML::DOM::_Element::canTighten{$tag} and not $nonindentable_ancestors and $last_tag_tightenable
874 0 0 0 $this_tag_tightenable = $HTML::DOM::_Element::canTighten{$tag} and not $nonindentable_ancestors
0 0 0 $this_tag_tightenable = $HTML::DOM::_Element::canTighten{$tag} and not $nonindentable_ancestors and $last_tag_tightenable
907 0 0 0 defined $entities and not length $entities
978 59 0 0 defined $entities and not length $entities
993 76 1 0 $self->{'_store_declarations'} and defined $self->{'_decl'}
1017 49 2 1 $skip_dels and $tag eq 'del'
1064 0 0 0 $empty_element_map->{$tag} and not @{$nillio unless $node->{'_content'};}
1074 0 0 0 $empty_element_map->{$tag} and not @{$nillio unless $node->{'_content'};}
1231 14 0 0 $_ eq $val and exists $HTML::DOM::_Element::boolean_attr{$name}
0 0 0 $_ eq $val and exists $HTML::DOM::_Element::boolean_attr{$name} and ref $HTML::DOM::_Element::boolean_attr{$name} ? $HTML::DOM::_Element::boolean_attr{$name}{$_} : $HTML::DOM::_Element::boolean_attr{$name} eq $_
1243 14 0 0 ref $val eq 'HTML::DOM::_Element' and $val->{'_tag'} eq '~literal'
1249 14 0 0 defined $entities and not length $entities
1261 93 70 9 scalar $self->content_list == 0 and $self->_empty_element_map->{$self->tag}
1352 0 0 477 defined $callback and ref $callback
1362 0 400 0 $c_pre and not UNIVERSAL::isa($c_pre, 'CODE')
1365 400 0 0 $c_post and not UNIVERSAL::isa($c_post, 'CODE')
1398 4344 0 240 $c_post and defined $I[0]
4344 77 163 $c_post and defined $I[0] and @C > 1
77 0 163 $c_post and defined $I[0] and @C > 1 and defined($this = $C[1][$I[1]])
77 0 163 $c_post and defined $I[0] and @C > 1 and defined($this = $C[1][$I[1]]) and ref $this
0 0 163 $c_post and defined $I[0] and @C > 1 and defined($this = $C[1][$I[1]]) and ref $this and not $this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''} && !@{$this->{'_content'};}
1425 0 163 0 defined $rv and ref $rv eq $travsignal_package
1462 0 59 4635 defined $this and ref $this
1497 0 0 0 ref $this and not $this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''}
1537 1653 2454 528 !(($content_r = $this->{'_content'}) && @$content_r) && ($this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''})
59 528 4107 ref $this and not !(($content_r = $this->{'_content'}) && @$content_r) && ($this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''})
1565 1240 0 3968 defined $current and ref $current
1581 0 0 0 $self->{'_content'} && @{$self->{'_content'};}
1590 0 26 43 ref $pc->[$i] and $pc->[$i] eq $self
1609 0 0 0 ref $j and $j eq $_[0]
1615 0 1 1 ref $pc->[$i] and $pc->[$i] eq $_[0]
1640 0 0 0 ref $j and $j eq $_[0]
1648 0 0 7 ref $pc->[$i] and $pc->[$i] eq $_[0]
1673 0 11 0 @stack and not length $stack[0]
1685 0 0 16 $here->{'_content'} and @{$here->{'_content'};} > $stack[0]
1689 8 8 0 @stack and not ref $here
1701 0 0 0 defined($here = $here->{'_parent'}) and ref $here
1709 527 0 1719 defined($here = $here->{'_parent'}) and ref $here
1718 22 0 43 defined($here = $here->{'_parent'}) and ref $here
1727 0 0 0 defined($here = $here->{'_parent'}) and ref $here
1812 0 0 0 exists $_[0]{$attribute} and $_[0]{$attribute} eq $value
1977 64 0 303 defined($this = $this->{'_parent'}) and ref $this
2066 0 0 0 $wantType and not $wantType{$tag}
2139 0 0 0 defined $i and ref $i
2178 0 0 0 $keys_h[$x] eq $keys_i[$x] and $$h{$keys_h[$x]} eq $$i{$keys_h[$x]}
2260 0 0 0 defined $v and $k ne '_name'
0 0 0 defined $v and $k ne '_name' and $k ne '_content'
0 0 0 defined $v and $k ne '_name' and $k ne '_content' and $k ne '_parent'
2425 0 0 0 $_[0] < 1 and $_[0] > -1
2435 0 0 0 $_[0] < 1 and $_[0] > -1

or 2 conditions

line l !l condition
176 17 6 +(shift())->{'_content'} ||= []
283 879 817 $self->{'_content'} ||= []
314 5 3 $self->{'_content'} ||= []
349 560 2 $self->{'_content'} ||= []
380 120 0 $parent->{'_content'} || (return $parent)
389 57 59 $_[0]{'_content'} || (return ())
462 0 0 $self->{'_content'} || []
809 47 30 $omissible_map ||= \%HTML::DOM::_Element::optionalEndTag
1004 1 15 $options{'skip_dels'} || 0
1029 0 0 $options{'extra_chars'} || ''
1213 0 0 $self->{'text'} || ''
1283 0 0 $self->{'text'} || ''
1587 43 22 $self->{'_parent'} || (return)
1588 43 0 $parent->{'_content'} || (return)
1600 1 0 +($_[0]{'_parent'} || (return))->{'_content'} || die('parent is childless?')
1627 8 0 +($_[0]{'_parent'} || (return))->{'_content'} || die('parent is childless?')
1660 23 42 $_->pindex || '0'
2041 0 0 $map{$this_tag} ||= []
2185 0 0 $h->{'_content'} || []
2186 0 0 $i->{'_content'} || []
2444 0 0 $_[0] || (return '')
2462 0 0 $_[0] || 0
2512 0 0 $this->{'start'} || ''
2525 0 0 $c->{'value'} || ''
2560 0 0 $this->{'_content'} || (next)

or 3 conditions

line l !l&&r !l&&!r condition
105 0 2153 0 ref $class || $class
630 0 0 0 ($ptag = +($this = shift @to_do)->{'_tag'}) eq 'pre' or $ptag eq 'textarea'
0 0 0 ($ptag = +($this = shift @to_do)->{'_tag'}) eq 'pre' or $ptag eq 'textarea' or $HTML::Tagset::isCDATA_Parent{$ptag}
666 0 0 0 $HTML::DOM::_Element::canTighten{$ptag} or ref $sibs->[1] and $HTML::DOM::_Element::canTighten{$sibs->[1]{'_tag'}}
676 0 0 0 $HTML::DOM::_Element::canTighten{$ptag} or ref $$sibs[$i - 1] and $HTML::DOM::_Element::canTighten{$$sibs[$i - 1]{'_tag'}}
682 0 0 0 ref $$sibs[$i - 1] or ref $$sibs[$i + 1]
738 107 0 754 $self->_empty_element_map->{$tag} or $e->{'_empty_element'}
786 0 0 0 length $_ > 65 or /[\x00-\x1F]/
832 0 0 0 $empty_element_map->{$tag} || $omissible_map->{$tag}
854 0 0 0 $tag eq 'pre' or $HTML::Tagset::isCDATA_Parent{$tag}
864 0 0 0 $tag eq 'pre' or $HTML::Tagset::isCDATA_Parent{$tag}
907 0 0 0 defined $entities and not length $entities or $HTML::Tagset::isCDATA_Parent{$_[3]{'_tag'}}
0 0 0 defined $entities and not length $entities or $HTML::Tagset::isCDATA_Parent{$_[3]{'_tag'}} or $encoded_content
955 0 1 162 $empty_element_map->{$tag} || $omissible_map->{$tag}
978 0 0 59 defined $entities and not length $entities or $HTML::Tagset::isCDATA_Parent{$_[3]{'_tag'}}
0 0 59 defined $entities and not length $entities or $HTML::Tagset::isCDATA_Parent{$_[3]{'_tag'}} or $encoded_content
1017 0 0 52 ($tag = +($this = shift @pile)->{'_tag'}) eq 'style' or $tag eq 'script'
0 1 51 ($tag = +($this = shift @pile)->{'_tag'}) eq 'style' or $tag eq 'script' or $skip_dels and $tag eq 'del'
1059 0 0 0 $attr eq '/' or $self->_valid_name($attr)
1142 0 0 0 $_ eq '_content' or $_ eq '_tag'
0 0 0 $_ eq '_content' or $_ eq '_tag' or $_ eq '_parent'
0 0 0 $_ eq '_content' or $_ eq '_tag' or $_ eq '_parent' or $_ eq '/'
1228 0 654 14 not length $_ or /^_/s
654 0 14 not length $_ or /^_/s or $_ eq '/'
1249 0 0 14 defined $entities and not length $entities or $encoded_content
1298 0 0 0 not length $_ or /^_/s
0 0 0 not length $_ or /^_/s or $_ eq '/'
1368 400 0 0 $c_pre or $c_post
1394 0 4584 4694 not defined $I[0] or ++$I[0] >= @{$C[0];}
1398 0 0 163 $this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''} && !@{$this->{'_content'};}
1497 0 0 0 $this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''}
1550 1700 2407 0 $content_r || $NIL
1879 0 1351 69 !defined($c->[1]) || ($c->[2] eq 'Regexp' ? !($val =~ /$c->[1]/) : ref $val ne $c->[2] || lc $val ne lc $c->[1])
1952 0 337 135 !defined($c->[1]) || ($c->[2] eq 'Regexp' ? !($val =~ /$c->[1]/) : ref $val ne $c->[2] || lc $val ne $c->[1])
2218 0 0 0 ref $class || $class
2464 0 0 0 $i <= -4000 or $i >= 4000
2508 0 0 0 $tag eq 'ul' or $tag eq 'dir'
0 0 0 $tag eq 'ul' or $tag eq 'dir' or $tag eq 'menu'
2516 0 0 0 $HTML::DOM::_Element::list_type_to_sub{$this->{'type'} or ''} || $HTML::DOM::_Element::list_type_to_sub{'1'}
2600 0 0 0 $this->{'id'} ||= $this->address