Condition Coverage

blib/lib/HTML/Selector/Element.pm
Criterion Covered Total %
condition 64 123 52.0


and 2 conditions

line l !l condition
308 35 6 !$refroot && 'banroot'
416 0 0 look_self($this, @$_) and return 1
493 0 1 $result = $_->look_down(@via_right) and return $result

and 3 conditions

line !l l&&!r l&&r condition
93 11 0 0 $n <= 0 and $cycle > 0
100 66 0 0 $n > @sibling && $cycle < 0
2 19 142 $n > 0 and $n <= @sibling
139 0 0 73 not $set->{'tag'} and $name ne "*"
276 33 7 7 $chained->{'is_root'} || $chained->{'sibling_root'} and $combinator =~ /([+~])/
280 35 6 6 $chained->{'is_root'} and $combinator =~ />/
36 2 3 $chained->{'root_child'} and $combinator =~ /([+~])/
329 13 0 25 $banroot and not $set->{'is_root'}
340 5 0 112 $this = $this->{'_parent'} and $this != $rootparent
357 0 0 11 $this = $this->{'_parent'} and $this != $rootparent
376 0 0 21 ref $this and $this->{'_tag'}
0 0 21 ref $this and $this->{'_tag'} and not $this->{'_tag'} =~ /^~/
389 0 0 51 ref $this and not $this->{'_tag'} =~ /^~/
525 0 0 462 ref $_ and $_->{'_tag'}
534 0 0 0 ref $matcher eq ref $value && $matcher eq $value
0 37 30 ref $matcher eq 'Regexp' && $value =~ /$matcher/

or 2 conditions

line l !l condition
86 66 0 $this->{'_parent'} || (return $this)
92 7 4 $cycle ||= 0
100 97 20 $cycle || (last)
259 29 18 $1 || ' '
277 1 6 $chained->{'sibling_root'} || ''
339 37 30 $root->{'_parent'} || 0
356 9 2 $root->{'_parent'} || 0
415 0 0 $_->{'tag'} or "*"
534 203 0 defined($matcher = shift()) + defined($value = $this->{$attr}) || (next)
569 0 1 $selector->{'is'} ||= [$selector->criteria]
576 0 0 $selector->{'is'} ||= [$selector->criteria]
585 0 2 $selector->{'is'} ||= [$selector->criteria]

or 3 conditions

line l !l&&r !l&&!r condition
95 0 0 0 $cycle ||= $cycle
199 2 2 0 $offset || $cycle
248 0 0 0 $set->{'tag'} ||= do { push @$static, "_tag", qr/^(?!~)/; "*" }
249 0 0 0 $set->{'sibling_root'} ||= $sibling_root
250 0 0 0 $set->{'root_child'} ||= $root_child
276 12 2 33 $chained->{'is_root'} || $chained->{'sibling_root'}
297 41 3 0 $set->{'tag'} ||= do { push @$static, "_tag", qr/^(?!~)/; "*" }
298 5 1 0 $set->{'sibling_root'} ||= $sibling_root
299 4 2 0 $set->{'root_child'} ||= $root_child
308 0 6 35 $strategy ||= !$refroot && 'banroot'
508 7 32 0 $self->{'find'} ||= find_closure($self->{'parsed'})
561 6 29 0 $store{join ", ", @_} ||= "HTML::Selector::Element"->new(@_)
568 0 1 0 $store{join ", ", @_} ||= "HTML::Selector::Element"->new(@_)
575 0 0 0 $store{join ", ", @_} ||= "HTML::Selector::Element"->new(@_)
584 0 2 0 $store{join ", ", @_} ||= "HTML::Selector::Element"->new(@_)