line |
true |
false |
branch |
99
|
6 |
0 |
unless (exists $imported_validators{$package}) |
102
|
0 |
6 |
if ($@) |
114
|
53 |
0 |
if (defined $subref) |
124
|
7 |
0 |
if (defined $filter) |
138
|
7 |
0 |
if (defined $filter) |
154
|
6 |
0 |
if (defined $filter) |
181
|
1 |
255 |
if ($required_re and &$required_re($k)) |
185
|
6 |
250 |
if ($optional_re and &$optional_re($k)) |
201
|
20 |
236 |
if (ref $valid{$field}) { } |
202
|
18 |
2 |
if (ref $valid{$field} eq 'ARRAY') |
204
|
1 |
34 |
unless defined $valid{$field}[$i] and length $valid{$field}[$i] and not $valid{$field}[$i] =~ /^\x00$/ |
207
|
2 |
16 |
unless grep {defined $_;} @{$valid{$field};} |
212
|
1 |
233 |
unless defined $valid{$field} and length $valid{$field} and not $valid{$field} =~ /^\x00$/ |
218
|
11 |
4 |
if (defined $valid{$field}) |
219
|
6 |
5 |
if (ref $deps eq 'HASH') { } |
|
4 |
1 |
elsif (ref $deps eq 'CODE') { } |
224
|
2 |
10 |
if (ref $valid{$field} eq 'ARRAY' and scalar @{$valid{$field};} == 1) { } |
231
|
6 |
6 |
if ($val_to_compare eq $key) |
260
|
0 |
0 |
if $valid{$field} |
262
|
0 |
0 |
if ($require_all) |
281
|
2 |
1 |
if /$re/ |
288
|
123 |
1 |
unless $profile->{'defaults'} |
291
|
3 |
0 |
unless (exists $valid{$field}) |
292
|
1 |
2 |
if (ref $value and ref $value eq 'CODE') { } |
302
|
29 |
183 |
unless exists $valid{$field} |
310
|
2 |
1 |
$deps[0] =~ /^\d+$/ ? : |
312
|
3 |
8 |
if exists $valid{$dep} |
314
|
1 |
2 |
unless $enough_required_fields >= $num_fields_to_require |
332
|
3 |
121 |
if (defined $profile->{'untaint_regexp_map'} or defined $profile->{'untaint_constraint_fields'}) { } |
|
10 |
222 |
elsif (defined $profile->{'untaint_all_constraints'} and $profile->{'untaint_all_constraints'} == 1) { } |
334
|
3 |
0 |
if (defined $profile->{'untaint_constraint_fields'}) |
335
|
3 |
0 |
if (ref $profile->{'untaint_constraint_fields'} eq 'ARRAY') { } |
|
0 |
0 |
elsif ($valid{$profile->{'untaint_constraint_fields'}}) { } |
346
|
0 |
3 |
if (defined $profile->{'untaint_regexp_map'}) |
348
|
0 |
0 |
if (ref $profile->{'untaint_regexp_map'} eq 'ARRAY') { } |
358
|
0 |
0 |
if $untaint_hash{$field} |
359
|
0 |
0 |
if $field =~ /$regex/ |
376
|
2 |
11 |
if ($profile->{'missing_optional_valid'} and $optional{$field} and not exists $valid{$field}) |
450
|
0 |
81 |
if defined $val |
452
|
42 |
39 |
if (defined $key) |
453
|
2 |
40 |
wantarray ? : |
457
|
1 |
38 |
wantarray ? : |
486
|
11 |
33 |
if defined $_[1] |
488
|
1 |
32 |
wantarray ? : |
522
|
13 |
21 |
if defined $field |
524
|
2 |
19 |
wantarray ? : |
554
|
2 |
2 |
wantarray ? : |
|
4 |
25 |
if defined $_[1] |
557
|
25 |
0 |
wantarray ? : |
590
|
1 |
16 |
if (ref $msgs eq 'CODE') { } |
601
|
0 |
16 |
if (defined $controls and ref $controls ne 'HASH') |
613
|
1 |
31 |
if (not defined $href->{'invalid_separator'} and defined $href->{'invalid_seperator'}) |
638
|
9 |
7 |
if ($self->has_invalid) |
648
|
6 |
10 |
if ($self->has_missing) |
657
|
12 |
4 |
unless ($self->success) |
658
|
3 |
9 |
if defined $profile{'any_errors'} |
705
|
0 |
0 |
if ($data) |
706
|
0 |
0 |
unless ref $data eq 'HASH' |
712
|
0 |
0 |
if ($field) { } |
728
|
0 |
157 |
if ($p{'as_hashref'}) { } |
761
|
4 |
12 |
unless defined $match |
762
|
5 |
7 |
$self->{'__UNTAINT_THIS'} ? : |
782
|
0 |
16 |
unless scalar @_ == 2 |
783
|
0 |
16 |
unless ref $href eq 'HASH' |
803
|
41 |
7 |
if (substr($re, 0, 1) eq '(') { } |
806
|
12 |
63 |
$force_method_p ? : |
808
|
5 |
70 |
if ($untaint_this and defined $match) { } |
821
|
0 |
7 |
$untaint_this ? : |
823
|
0 |
7 |
if ($force_method_p) { } |
829
|
0 |
7 |
if $@ |
839
|
0 |
24 |
unless $fmt =~ /%s/ |
850
|
371 |
409 |
unless defined $val |
853
|
175 |
234 |
if (ref $val eq 'ARRAY') { } |
855
|
172 |
3 |
grep(defined($_), @$val) ? : |
859
|
234 |
0 |
length $val ? : |
868
|
0 |
26 |
unless scalar @_ == 3 |
869
|
7 |
19 |
if (ref $valid->{$field} eq 'ARRAY') { } |
871
|
22 |
0 |
if defined $valid->{$field}[$i] |
875
|
19 |
0 |
if defined $valid->{$field} |
898
|
0 |
159 |
unless scalar @_ == 4 |
904
|
44 |
115 |
unless ref $constraint_spec |
907
|
38 |
121 |
if (ref $c->{'constraint'} eq 'HASH') |
911
|
5 |
33 |
if $constraint_spec->{'constraint_method'} |
915
|
22 |
137 |
if (ref $c->{'constraint'} eq 'Regexp' or $c->{'constraint'} =~ m[^\s*(/.+/|m(.).+\2)[cgimosx]*\s*$]) { } |
|
76 |
61 |
elsif (ref $c->{'constraint'} eq 'CODE') { } |
925
|
16 |
0 |
unless ($c->{'name'} or ref $c->{'constraint'}) |
930
|
3 |
58 |
if ($untaint_this) { } |
933
|
0 |
3 |
if ($match_sub) { } |
|
2 |
1 |
elsif ($c->{'constraint'} =~ /^RE_/) { } |
949
|
51 |
7 |
if (defined *{&qualify_to_ref($routine);}{'CODE'}) { } |
|
1 |
6 |
elsif (my $valid_sub = *{&qualify_to_ref('valid_' . $c->{'constraint'});}{'CODE'}) { } |
|
5 |
1 |
elsif ($c->{'constraint'} =~ /^RE_/) { } |
988
|
0 |
161 |
unless scalar @_ == 4 |
991
|
24 |
137 |
if (defined $c->{'params'}) { } |
994
|
7 |
37 |
ref $fname ? : |
1001
|
77 |
84 |
if $c->{'is_method'} |
1024
|
0 |
161 |
unless scalar @_ == 4 |
1036
|
137 |
24 |
if (defined $match) |
1037
|
12 |
125 |
$untaint_this ? : |
1040
|
79 |
82 |
unless $success |
1058
|
0 |
285 |
if (&Scalar::Util::blessed($data) and $data->can('param')) { } |
|
285 |
0 |
elsif (ref $data eq 'HASH') { } |
1069
|
0 |
0 |
if ($data->isa('CGI::Simple')) { } |
1078
|
0 |
0 |
scalar @v > 1 ? : |
1121
|
4 |
5 |
if ref $_ |
1125
|
3 |
4 |
$self->get_current_constraint_value =~ qr/^$re$/ ? : |
1133
|
0 |
248 |
unless scalar @_ == 3 |
1135
|
0 |
248 |
unless $name =~ /^constraint(_method)?$/ |
1146
|
28 |
17 |
if (&$sub($key)) |
1150
|
2 |
26 |
if (ref $cur eq 'ARRAY') { } |
|
1 |
25 |
elsif ($cur) { } |
1161
|
0 |
28 |
if $profile->{'debug'} |
1199
|
4 |
145 |
unless exists $valid->{$field} |
1201
|
14 |
131 |
if ref $constraint_list eq 'ARRAY' |
1217
|
66 |
91 |
if $force_method_p |
1219
|
7 |
150 |
if ref $valid->{$field} eq 'ARRAY' |
1221
|
7 |
150 |
if ($is_value_list) { } |
1223
|
11 |
3 |
unless (exists $constraints_seen{\$c}) |
1231
|
4 |
7 |
if ($failed->{'failed'}) { } |
1236
|
0 |
7 |
if $untaint_this |
1248
|
75 |
75 |
if ($failed->{'failed'}) { } |
1252
|
12 |
63 |
if $untaint_this |
1257
|
71 |
72 |
if (@invalid_list) |
1261
|
12 |
59 |
$is_constraint_list ? : |