Condition Coverage

blib/lib/Mojo/DOM/Role/Restrict.pm
Criterion Covered Total %
condition 31 36 86.1


and 3 conditions

line !l l&&!r l&&r condition
21 21 50 27 $_[1]{$_} and not ref $_[1]{$_}
71 27 0 $_[1]{$_} and not ref $_[1]{$_} and do { $_[1]{$_} = {"*", 1} }
32 3 0 0 $_[1] and not $_[0]->diff_module_name =~ /$_[1]/u
58 0 3 0 @parts and not $parts[0]
146 32 160 30 ref $valid && $valid->{'validate_tag'}
155 22 15 65 $valid && ($valid =~ /1/u || $value =~ /$valid/u)

or 2 conditions

line l !l condition
168 10 2 _valid_attribute($spec, $tag, $_, $attrs->{$_}) or return 0
170 30 10 _valid($_, $spec) or return 0
173 3 6 _valid($_, $spec) or return 0

or 3 conditions

line l !l&&r !l&&!r condition
144 92 118 12 $spec->{$tag} // $spec->{'*'}
154 10 4 152 $spec->{$tag}{$attr} // $spec->{$tag}{'*'}
4 76 76 ($spec->{$tag}{$attr} // $spec->{$tag}{'*'}) // $spec->{'*'}{$attr}
76 62 14 (($spec->{$tag}{$attr} // $spec->{$tag}{'*'}) // $spec->{'*'}{$attr}) // $spec->{'*'}{'*'}