Condition Coverage

blib/lib/HTML/DOM/_Element.pm
Criterion Covered Total %
condition 113 410 27.5


and 3 conditions

line !l l&&!r l&&r condition
108 0 0 2151 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 249 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 67 0 $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'}}
819 77 0 0 defined $indent and length $indent
834 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
875 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
908 0 0 0 defined $entities and not length $entities
979 59 0 0 defined $entities and not length $entities
994 76 1 0 $self->{'_store_declarations'} and defined $self->{'_decl'}
1018 49 2 1 $skip_dels and $tag eq 'del'
1065 0 0 0 $empty_element_map->{$tag} and not @{$nillio unless $node->{'_content'};}
1075 0 0 0 $empty_element_map->{$tag} and not @{$nillio unless $node->{'_content'};}
1234 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 $_
1246 14 0 0 ref $val eq 'HTML::DOM::_Element' and $val->{'_tag'} eq '~literal'
1252 14 0 0 defined $entities and not length $entities
1264 93 70 9 scalar $self->content_list == 0 and $self->_empty_element_map->{$self->tag}
1355 0 0 476 defined $callback and ref $callback
1365 0 399 0 $c_pre and not UNIVERSAL::isa($c_pre, 'CODE')
1368 399 0 0 $c_post and not UNIVERSAL::isa($c_post, 'CODE')
1401 4325 0 240 $c_post and defined $I[0]
4325 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'};}
1428 0 163 0 defined $rv and ref $rv eq $travsignal_package
1465 0 59 4617 defined $this and ref $this
1500 0 0 0 ref $this and not $this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''}
1540 1648 2969 0 !(($content_r = $this->{'_content'}) && @$content_r) && ($this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''})
59 528 4089 ref $this and not !(($content_r = $this->{'_content'}) && @$content_r) && ($this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''})
1568 1239 0 3962 defined $current and ref $current
1584 0 0 0 $self->{'_content'} && @{$self->{'_content'};}
1593 0 26 43 ref $pc->[$i] and $pc->[$i] eq $self
1612 0 0 0 ref $j and $j eq $_[0]
1618 0 1 1 ref $pc->[$i] and $pc->[$i] eq $_[0]
1643 0 0 0 ref $j and $j eq $_[0]
1651 0 0 7 ref $pc->[$i] and $pc->[$i] eq $_[0]
1676 0 11 0 @stack and not length $stack[0]
1688 0 0 16 $here->{'_content'} and @{$here->{'_content'};} > $stack[0]
1692 8 8 0 @stack and not ref $here
1704 0 0 0 defined($here = $here->{'_parent'}) and ref $here
1712 526 0 1713 defined($here = $here->{'_parent'}) and ref $here
1721 22 0 43 defined($here = $here->{'_parent'}) and ref $here
1730 0 0 0 defined($here = $here->{'_parent'}) and ref $here
1815 0 0 0 exists $_[0]{$attribute} and $_[0]{$attribute} eq $value
1980 63 0 297 defined($this = $this->{'_parent'}) and ref $this
2069 0 0 0 $wantType and not $wantType{$tag}
2142 0 0 0 defined $i and ref $i
2181 0 0 0 $keys_h[$x] eq $keys_i[$x] and $$h{$keys_h[$x]} eq $$i{$keys_h[$x]}
2263 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'
2428 0 0 0 $_[0] < 1 and $_[0] > -1
2438 0 0 0 $_[0] < 1 and $_[0] > -1

or 2 conditions

line l !l condition
176 17 6 (shift())->{'_content'} ||= []
283 877 817 $self->{'_content'} ||= []
314 5 3 $self->{'_content'} ||= []
349 559 2 $self->{'_content'} ||= []
380 120 0 $parent->{'_content'} || (return $parent)
389 57 59 $_[0]{'_content'} || (return ())
462 0 0 $self->{'_content'} || []
810 47 30 $omissible_map ||= \%HTML::DOM::_Element::optionalEndTag
1005 1 15 $options{'skip_dels'} || 0
1030 0 0 $options{'extra_chars'} || ''
1216 0 0 $self->{'text'} || ''
1286 0 0 $self->{'text'} || ''
1590 43 22 $self->{'_parent'} || (return)
1591 43 0 $parent->{'_content'} || (return)
1603 1 0 ($_[0]{'_parent'} || (return))->{'_content'} || die('parent is childless?')
1630 8 0 ($_[0]{'_parent'} || (return))->{'_content'} || die('parent is childless?')
1663 23 42 $_->pindex || '0'
2044 0 0 $map{$this_tag} ||= []
2188 0 0 $h->{'_content'} || []
2189 0 0 $i->{'_content'} || []
2447 0 0 $_[0] || (return '')
2465 0 0 $_[0] || 0
2515 0 0 $this->{'start'} || ''
2528 0 0 $c->{'value'} || ''
2563 0 0 $this->{'_content'} || (next)

or 3 conditions

line l !l&&r !l&&!r condition
105 0 2151 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 753 $self->_empty_element_map->{$tag} or $e->{'_empty_element'}
786 0 0 0 length $_ > 65 or /[\x00-\x1F]/
833 0 0 0 $empty_element_map->{$tag} || $omissible_map->{$tag}
855 0 0 0 $tag eq 'pre' or $HTML::Tagset::isCDATA_Parent{$tag}
865 0 0 0 $tag eq 'pre' or $HTML::Tagset::isCDATA_Parent{$tag}
908 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
956 0 0 163 $empty_element_map->{$tag} || $omissible_map->{$tag}
979 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
1018 0 0 52 ($tag = ($this = shift @pile)->{'_tag'}) eq 'style' or $tag eq 'script'
0 0 52 ($tag = ($this = shift @pile)->{'_tag'}) eq 'style' or $tag eq 'script' or $skip_dels and $tag eq 'del'
1060 0 0 0 $attr eq '/' or $self->_valid_name($attr)
1143 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 '/'
1231 0 654 14 not length $_ or /^_/s
654 0 14 not length $_ or /^_/s or $_ eq '/'
1252 0 0 14 defined $entities and not length $entities or $encoded_content
1301 0 0 0 not length $_ or /^_/s
0 0 0 not length $_ or /^_/s or $_ eq '/'
1371 399 0 0 $c_pre or $c_post
1397 0 4565 4676 not defined $I[0] or ++$I[0] >= @{$C[0];}
1401 0 0 163 $this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''} && !@{$this->{'_content'};}
1500 0 0 0 $this->{'_empty_element'} || $$empty_element_map{$this->{'_tag'} or ''}
1553 1695 2394 0 $content_r || $NIL
1882 0 0 1382 !defined($c->[1]) || ($c->[2] eq 'Regexp' ? !($val =~ /$c->[1]/) : ref $val ne $c->[2] || lc $val ne lc $c->[1])
1955 0 0 465 !defined($c->[1]) || ($c->[2] eq 'Regexp' ? !($val =~ /$c->[1]/) : ref $val ne $c->[2] || lc $val ne $c->[1])
2221 0 0 0 ref $class || $class
2467 0 0 0 $i <= -4000 or $i >= 4000
2511 0 0 0 $tag eq 'ul' or $tag eq 'dir'
0 0 0 $tag eq 'ul' or $tag eq 'dir' or $tag eq 'menu'
2519 0 0 0 $HTML::DOM::_Element::list_type_to_sub{$this->{'type'} or ''} || $HTML::DOM::_Element::list_type_to_sub{'1'}
2603 0 0 0 $this->{'id'} ||= $this->address