Branch Coverage

blib/lib/Mojo/DOM/Role/Restrict.pm
Criterion Covered Total %
branch 45 66 68.1


line true false branch
6 11 15 $_[1] ? :
19 33 37 if ($_[1])
28 12 0 if _restrict($_[0]->tree, $_[0]->restrict_spec($_[1]))
39 90 53 if ($type eq 'tag')
44 14 76 unless $tag
51 0 0 $xml ? :
45 0 defined $value ? :
45 33 if $key
60 0 0 $EMPTY{$tag} ? :
0 0 $xml ? :
0 76 unless $tree->[4]
71 36 17 if $type eq 'text'
74 2 15 if $type eq 'raw'
77 15 0 if $type eq 'root'
80 0 0 if $type eq 'doctype'
83 0 0 if $type eq 'comment'
86 0 0 if $type eq 'cdata'
89 0 0 if $type eq 'pi'
99 144 30 $valid ? :
30 174 ref $valid && $valid->{'validate_tag'} ? :
108 57 33 $valid && ($valid =~ /1/u || $value =~ /$valid/u) ? :
64 90 ref $valid ? :
117 38 20 if ($tree->[0] eq 'tag') { }
9 11 elsif ($tree->[0] eq 'root') { }
119 4 34 unless $tag
122 32 0 if ($tree->[4])
133 76 44 if ($tree->[0] eq 'tag') { }
12 32 elsif ($tree->[0] eq 'root') { }
135 12 64 unless $tag
139 38 26 if $key
141 64 0 if ($tree->[4])
144 84 12 _restrict($_, $spec) ? :
149 12 0 _restrict($_, $spec) ? :