Condition Coverage

blib/lib/Mojo/DOM/CSS.pm
Criterion Covered Total %
condition 94 99 94.9


and 2 conditions

line l !l condition
174 5439 1836 _combinator([reverse(@$_)], $current, $tree, $scope, 0) and return 1
233 15 33 $_ ne $current and return undef

and 3 conditions

line !l l&&!r l&&r condition
36 4 12 1625 $current ne $scope and $current->[0] ne "root"
16 0 1625 $current ne $scope and $current->[0] ne "root" and $current = $current->[3]
51 754 7 1 not defined $value and defined $value_re
52 7 31 723 defined $value && defined $value_re
86 1318 742 2444 @$selectors and ref $selectors->[-1]
128 1602 1 69 (my $name = $1) =~ s/^([^|]*)\|//u && $1 ne '*'
166 212 55 10 $pc->[1] eq 'has' || $pc->[1] eq 'is' || $pc->[1] eq 'not' and grep {_is_scoped($_);} @{$$pc[2];}
218 0 44 10 $current->[3] && $current->[3][0] eq 'root'
226 0 18 21 $current->[0] eq "tag" and exists $current->[2]{'href'}
250 396 158 246 $args->[0] != 0 && $delta < 0 == $args->[0] < 0 && $delta % $args->[0] == 0
292 139 3227 6989 $is_tag and $type eq "tag"
139 1769 1458 $is_tag and $type eq "attr"
293 135 3411 3443 defined $s->[1] and not $current->[1] =~ /$s->[1]/u
294 3469 59 18 defined $s->[2] and not _namespace($s->[2], $current)

or 2 conditions

line l !l condition
7 0 61 $ENV{'MOJO_DOM_CSS_DEBUG'} || 0
105 108 175 $2 // ""
129 64 1 $ns{$alias} // (return [["invalid"]])
154 42 9 $2 // 0

or 3 conditions

line l !l&&r !l&&!r condition
51 716 1 761 not $name =~ /$name_re/u or not defined $value and defined $value_re
52 38 436 287 not defined $value && defined $value_re or $value =~ /$value_re/u
105 128 2 153 $3 // $4
2 93 60 ($3 // $4) // $5
115 6 5 291 $name eq "has" or $name eq "is"
11 44 247 $name eq "has" or $name eq "is" or $name eq "not"
166 15 50 212 $pc->[1] eq 'has' || $pc->[1] eq 'is' || $pc->[1] eq 'not'
203 25 35 144 exists $current->[2]{'checked'} || exists $current->[2]{'selected'}
215 2 2 54 $_->[0] eq 'comment' || $_->[0] eq 'pi'
221 156 0 76 $_->[0] eq "text" or $_->[0] eq "raw"
225 13 13 1053 $class eq "any-link" or $class eq "link"
26 13 1040 $class eq "any-link" or $class eq "link" or $class eq "visited"
231 20 20 1000 $class eq "only-child" or $class eq "only-of-type"
239 27 46 919 $class eq 'nth-of-type' || $class eq 'nth-last-of-type'
245 297 46 649 $class eq "nth-last-child" or $class eq "nth-last-of-type"