Branch Coverage

blib/lib/Catalyst/Plugin/HTML/Scrubber.pm
Criterion Covered Total %
branch 37 50 74.0


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 93 36 if (ref $conf ne "HASH" or $conf->{'auto'})
43 69 24 ref $conf eq 'HASH' ? :
54 77 18 if (exists $c->req->data_handlers->{$c->req->content_type})
55 77 0 if (my $body_data = $c->request->body_data)
62 9 86 if ($c->request->can("data"))
64 9 0 if ($data)
80 205 24 if (ref $data eq 'HASH') { }
24 0 elsif (ref $data eq 'ARRAY') { }
0 0 elsif (ref $data eq 'CODE') { }
82 48 208 unless ($c->_should_scrub_param($conf, $key))
88 48 160 if (my $ref = ref $data->{$key}) { }
90 48 0 if defined $data->{$key}
96 160 0 if defined $data->{$key}
101 0 48 if (ref $_) { }
104 48 0 if defined $_
121 0 208 unless defined $value
125 12 196 if ($conf->{'no_encode_entities'})
135 216 36 if ($conf and $conf->{'ignore_params'})
137 0 216 if (ref $ignore_params ne "ARRAY")
141 216 180 if (ref $ignore_param eq 'Regexp') { }
142 36 180 if $param =~ /$ignore_param/
144 12 168 if $param eq $ignore_param