Branch Coverage

blib/lib/Mojo/DOM/Role/Restrict.pm
Criterion Covered Total %
branch 52 82 63.4


line true false branch
7 14 18 $_[1] ? :
20 36 43 if ($_[1])
29 12 0 if _restrict($_[0]->tree, $_[0]->restrict_spec($_[1]))
32 0 3 if ($_[1] and not $_[0]->diff_module_name =~ /$_[1]/u)
36 0 3 if $_[2]
37 0 3 if defined $_[3]
56 3 0 unless ($self->diff_module_loaded)
58 0 3 if @parts and not $parts[0]
63 3 0 $flag ? :
65 0 3 $@ ? :
67 0 0 if $err
86 108 71 if ($type eq "tag")
91 16 92 unless $tag
98 0 0 $xml ? :
53 0 defined $value ? :
53 37 if $key
107 0 0 $EMPTY{$tag} ? :
0 0 $xml ? :
0 92 unless $tree->[4]
118 50 21 if $type eq "text"
121 3 18 if $type eq "raw"
124 18 0 if $type eq "root"
127 0 0 if $type eq "doctype"
130 0 0 if $type eq "comment"
133 0 0 if $type eq "cdata"
136 0 0 if $type eq "pi"
146 160 32 $valid ? :
30 192 ref $valid && $valid->{'validate_tag'} ? :
155 65 37 $valid && ($valid =~ /1/u || $value =~ /$valid/u) ? :
64 102 ref $valid ? :
164 38 20 if ($tree->[0] eq 'tag') { }
9 11 elsif ($tree->[0] eq 'root') { }
166 4 34 unless $tag
169 32 0 if ($tree->[4])
180 76 44 if ($tree->[0] eq 'tag') { }
12 32 elsif ($tree->[0] eq 'root') { }
182 12 64 unless $tag
186 38 26 if $key
188 64 0 if ($tree->[4])
191 84 12 _restrict($_, $spec) ? :
196 12 0 _restrict($_, $spec) ? :