Branch Coverage

blib/lib/Mojo/DOM/Role/Restrict.pm
Criterion Covered Total %
branch 45 82 54.8


line true false branch
7 11 15 $_[1] ? :
20 33 37 if ($_[1])
29 12 0 if _restrict($_[0]->tree, $_[0]->restrict_spec($_[1]))
32 0 0 if ($_[1] and not $_[0]->diff_module_name =~ /$_[1]/u)
36 0 0 if $_[2]
37 0 0 if defined $_[3]
56 0 0 unless ($self->diff_module_loaded)
58 0 0 if @parts and not $parts[0]
63 0 0 $flag ? :
65 0 0 $@ ? :
67 0 0 if $err
86 90 53 if ($type eq "tag")
91 14 76 unless $tag
98 0 0 $xml ? :
45 0 defined $value ? :
45 33 if $key
107 0 0 $EMPTY{$tag} ? :
0 0 $xml ? :
0 76 unless $tree->[4]
118 36 17 if $type eq "text"
121 2 15 if $type eq "raw"
124 15 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 144 30 $valid ? :
30 174 ref $valid && $valid->{'validate_tag'} ? :
155 57 33 $valid && ($valid =~ /1/u || $value =~ /$valid/u) ? :
64 90 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) ? :