line |
true |
false |
branch |
46
|
1 |
132 |
unless defined $$rules{'fields'} |
49
|
131 |
131 |
unless exists $$rules{$_} |
50
|
4 |
127 |
if (ref $$rules{$_} ne 'ARRAY' or @{$$rules{$_};} % 2) |
56
|
1 |
255 |
unless /^(fields|filters|checks)$/ |
60
|
124 |
2 |
@{$$rules{'fields'};} ? : |
65
|
156 |
68 |
if exists $$input{$key} |
72
|
49 |
173 |
if $err |
76
|
45 |
79 |
keys %$error ? : |
87
|
157 |
28 |
if ($ref eq 'CODE') { } |
|
26 |
2 |
elsif ($ref eq 'ARRAY') { } |
89
|
56 |
101 |
unless defined $param |
94
|
19 |
20 |
if (defined $param) { } |
95
|
9 |
10 |
if $result |
114
|
146 |
103 |
if (_match($key, $match)) |
115
|
98 |
48 |
$check ? : |
116
|
97 |
47 |
if ($check) { } |
117
|
49 |
48 |
if $temp |
124
|
173 |
155 |
if $check |
130
|
231 |
35 |
if (not ref $b) { } |
|
22 |
13 |
elsif (ref $b eq 'ARRAY') { } |
|
12 |
1 |
elsif (ref $b eq 'Regexp') { } |
147
|
25 |
1 |
if (exists $FILTERS{$_}) { } |
154
|
17 |
4 |
@result == 1 ? : |
160
|
17 |
20 |
if defined $_[0] and $_[0] ne '' |
167
|
0 |
3 |
unless defined $condition |
169
|
0 |
3 |
if (ref $condition and ref $condition ne 'CODE') |
174
|
3 |
4 |
ref $condition eq 'CODE' ? : |
178
|
3 |
4 |
unless $required |
179
|
2 |
2 |
if defined $value and $value ne '' |
187
|
4 |
2 |
if exists $_[1]{$_[2]} |
196
|
1 |
3 |
if not defined $_[0] or $_[0] eq '' |
197
|
1 |
2 |
if defined $_[1]{$other} and $_[0] eq $_[1]{$other} |
206
|
1 |
5 |
if not defined $_[0] or $_[0] eq '' |
207
|
2 |
3 |
if length $_[0] >= $min and length $_[0] <= $max |
216
|
1 |
3 |
if not defined $_[0] or $_[0] eq '' |
217
|
1 |
2 |
if length $_[0] >= $length |
226
|
1 |
4 |
if not defined $_[0] or $_[0] eq '' |
227
|
2 |
2 |
if length $_[0] <= $length |
236
|
2 |
3 |
if not defined $_[0] or ref $_[0] eq $class |
244
|
1 |
2 |
unless ref $regexp eq 'Regexp' |
246
|
1 |
4 |
if not defined $_[0] or $_[0] eq '' |
247
|
1 |
3 |
if $_[0] =~ /$regexp/ |
255
|
1 |
2 |
unless ref $arrayref eq 'ARRAY' |
257
|
1 |
4 |
if not defined $_[0] or $_[0] eq '' |
258
|
1 |
3 |
if _match($_[0], $arrayref) |
266
|
1 |
5 |
if (defined $filters and ref $filters eq 'HASH') |
268
|
1 |
0 |
if ref $$filters{$key} eq 'CODE' |
276
|
5 |
1 |
unless ref $self |
278
|
2 |
4 |
if (ref $input ne 'HASH' or ref $rules ne 'HASH') |
292
|
27 |
0 |
$AUTOLOAD =~ /::(\w+)$/ ? : |
293
|
0 |
27 |
if ($sub =~ /(params|rules)/) { } |
|
21 |
6 |
elsif ($sub =~ /(data|error)/) { } |
|
3 |
3 |
elsif ($sub eq 'success') { } |
|
2 |
1 |
elsif ($sub eq 'to_hash') { } |
297
|
8 |
13 |
if (my $field = shift()) { } |
299
|
6 |
2 |
if (scalar @$fields) |
300
|
3 |
3 |
unless _match($field, $fields) |