Condition Coverage

blib/lib/Mojo/DOM58/_CSS.pm
Criterion Covered Total %
condition 94 101 93.0


and 2 conditions

line l !l condition
206 5094 1704 _combinator([reverse(@$_)], $current, $tree, $scope, 0) and return 1
266 15 33 $_ ne $current and return undef

and 3 conditions

line !l l&&!r l&&r condition
53 4 12 1587 $current ne $scope and $current->[0] ne "root"
16 0 1587 $current ne $scope and $current->[0] ne "root" and $current = $current->[3]
68 662 7 1 not defined $value and defined $value_re
69 7 31 631 defined $value && defined $value_re
105 1186 708 2232 @$selectors and ref $selectors->[-1]
156 1462 1 69 (my $name = $1) =~ s/^([^|]*)\|// && $1 ne '*'
157 1463 4 65 defined $alias and length $alias
1467 64 1 defined $alias and length $alias and not defined $ns{$alias}
158 1463 4 64 defined $alias && length $alias
198 208 55 10 $pc->[1] eq 'has' || $pc->[1] eq 'is' || $pc->[1] eq 'not' and grep {_is_scoped($_);} @{$$pc[2];}
251 0 44 8 $current->[3] && $current->[3][0] eq 'root'
259 0 18 21 $current->[0] eq "tag" and exists $current->[2]{'href'}
284 396 158 246 $args->[0] != 0 && $delta < 0 == $args->[0] < 0 && $delta % $args->[0] == 0
326 139 3001 6640 $is_tag and $type eq "tag"
139 1767 1234 $is_tag and $type eq "attr"
327 135 3247 3258 defined $s->[1] and not $current->[1] =~ /$s->[1]/
328 3305 59 18 defined $s->[2] and not _namespace($s->[2], $current)

or 2 conditions

line l !l condition
12 0 2 $ENV{'MOJO_DOM58_CSS_DEBUG'} || 0
186 42 9 $2 || 0

or 3 conditions

line l !l&&r !l&&!r condition
30 0 1118 0 ref $class || $class
68 355 1 669 not $name =~ /$name_re/ or not defined $value and defined $value_re
69 38 372 259 not defined $value && defined $value_re or $value =~ /$value_re/
143 6 5 287 $name eq "has" or $name eq "is"
11 44 243 $name eq "has" or $name eq "is" or $name eq "not"
198 15 50 208 $pc->[1] eq 'has' || $pc->[1] eq 'is' || $pc->[1] eq 'not'
236 25 35 144 exists $current->[2]{'checked'} || exists $current->[2]{'selected'}
248 2 2 54 $_->[0] eq 'comment' || $_->[0] eq 'pi'
254 156 0 76 $_->[0] eq "text" or $_->[0] eq "raw"
258 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"
264 20 20 1000 $class eq "only-child" or $class eq "only-of-type"
272 27 46 919 $class eq 'nth-of-type' || $class eq 'nth-last-of-type'
279 297 46 649 $class eq "nth-last-child" or $class eq "nth-last-of-type"