Branch Coverage

blib/lib/Catalyst/Plugin/HTML/Scrubber.pm
Criterion Covered Total %
branch 48 62 77.4


line true false branch
17 0 4 if (ref $conf eq 'ARRAY') { }
3 1 elsif (ref $conf eq 'HASH') { }
21 0 3 unless defined $c->config->{'scrubber'}{'auto'}
42 105 36 if (ref $conf ne "HASH" or $conf->{'auto'})
43 81 24 ref $conf eq 'HASH' ? :
52 12 95 if $c->_req_path_exempt_from_scrubbing($conf)
58 77 18 if (exists $c->req->data_handlers->{$c->req->content_type})
59 77 0 if (my $body_data = $c->request->body_data)
66 9 86 if ($c->request->can("data"))
68 9 0 if ($data)
84 205 24 if (ref $data eq 'HASH') { }
24 0 elsif (ref $data eq 'ARRAY') { }
0 0 elsif (ref $data eq 'CODE') { }
86 48 208 unless ($c->_should_scrub_param($conf, $key))
92 48 160 if (my $ref = ref $data->{$key}) { }
94 48 0 if defined $data->{$key}
100 160 0 if defined $data->{$key}
105 0 48 if (ref $_) { }
108 48 0 if defined $_
125 0 208 unless defined $value
129 12 196 if ($conf->{'no_encode_entities'})
139 216 36 if ($conf and $conf->{'ignore_params'})
141 0 216 if (ref $ignore_params ne "ARRAY")
145 216 180 if (ref $ignore_param eq 'Regexp') { }
146 36 180 if $param =~ /$ignore_param/
148 12 168 if $param eq $ignore_param
161 35 72 unless exists $conf->{'ignore_paths'}
164 72 0 unless $req_path =~ m[^/]
166 66 72 if (ref $ignore eq 'Regexp') { }
167 6 60 if $req_path =~ /$ignore/
169 6 66 if $req_path eq $ignore