line |
true |
false |
branch |
56
|
5 |
4 |
if $rejects |
83
|
24 |
112 |
if $$rules{'_all'} |
85
|
738 |
116 |
unless $param =~ m[^/([^/]+)/$] |
87
|
52 |
64 |
if /$re/ |
89
|
116 |
20 |
if $$rules{$_} |
93
|
68 |
68 |
if $rj |
98
|
9 |
158 |
if $_ eq '_all' |
99
|
22 |
136 |
if m[^/[^/]+/$] |
100
|
7 |
40 |
if $$rules{$_}{'required'} and !defined($$params{$_}) || $$params{$_} eq '' |
122
|
22 |
165 |
if m[^/[^/]+/$] |
123
|
131 |
34 |
unless not defined $$params{$_} or $$params{$_} eq '' |
126
|
3 |
31 |
if (exists $$param_rules{$_}{'default'} and ref $$param_rules{$_}{'default'} eq 'CODE') { } |
|
3 |
28 |
elsif (exists $$param_rules{$_}{'default'}) { } |
136
|
5 |
149 |
if not defined $$params{$_} or $$params{$_} eq '' |
141
|
731 |
110 |
unless $p =~ m[^/([^/]+)/$] |
143
|
61 |
49 |
unless /$re/ |
146
|
131 |
18 |
if $$param_rules{$_} |
148
|
2 |
147 |
if scalar @refs == 0 and $$self{'ignore_missing'} |
149
|
2 |
145 |
unless (scalar @refs and $$self{'ignore_missing'}) |
156
|
29 |
116 |
if (ref $$params{$_} eq 'HASH') { } |
|
9 |
107 |
elsif (ref $$params{$_} eq 'ARRAY') { } |
174
|
484 |
69 |
unless $r =~ m[^/([^/]+)/$] |
178
|
26 |
43 |
unless scalar @matches > 0 |
181
|
6 |
37 |
if $$param_rules{$r}{'parse'} |
183
|
11 |
96 |
if $$param_rules{$_}{'parse'} |
186
|
17 |
90 |
if ($parse and ref $parse eq 'CODE') { } |
189
|
0 |
17 |
if (ref $$parsed{$k} eq 'HASH') { } |
|
0 |
17 |
elsif (ref $$parsed{$k} eq 'ARRAY') { } |
207
|
7 |
49 |
if ($group_rules) |
212
|
8 |
3 |
if (exists $$group_rules{$_}{'params'}) { } |
|
3 |
0 |
elsif (exists $$group_rules{$_}{'regex'}) { } |
218
|
0 |
3 |
unless $re |
221
|
27 |
12 |
unless $p =~ /$re/ |
232
|
3 |
5 |
if (ref $$parsed{$k} eq 'ARRAY') { } |
|
0 |
5 |
elsif (ref $$parsed{$k} eq 'HASH') { } |
263
|
2 |
152 |
unless $validations |
268
|
2 |
66 |
if not $$validations{'required'} and !defined($value) || $value eq '' |
269
|
3 |
81 |
if $$validations{'required'} and !defined($value) || $value eq '' |
273
|
1 |
0 |
if $$validations{'forbidden'} and defined $value and $value ne '' |
276
|
29 |
117 |
if ($$validations{'hash'}) { } |
|
11 |
106 |
elsif ($$validations{'array'}) { } |
300
|
23 |
306 |
if $v eq 'parse' or $v eq 'default' |
301
|
9 |
84 |
if $type and $type eq 'array' and $v eq 'values' |
302
|
29 |
55 |
if $type and $type eq 'hash' and $v eq 'keys' |
305
|
69 |
199 |
ref $$validations{$v} eq 'ARRAY' ? : |
309
|
18 |
250 |
if ($v eq 'validate' and ref $$validations{$v} eq 'CODE') { } |
|
9 |
241 |
elsif (exists $$self{'_custom_validations'} and exists $$self{'_custom_validations'}{$v} and ref $$self{'_custom_validations'}{$v} eq 'CODE') { } |
311
|
6 |
12 |
unless $$validations{$v}($value, @data) |
314
|
3 |
6 |
unless $$self{'_custom_validations'}{$v}($value, @data) |
317
|
43 |
198 |
unless 'Brannigan::Validations'->$v($value, @data) |
321
|
43 |
101 |
scalar @rejects ? : |
334
|
2 |
9 |
unless ref $value eq 'ARRAY' |
339
|
0 |
9 |
if $_self |
345
|
9 |
9 |
if $rj |
349
|
7 |
2 |
scalar keys %$rejects ? : |
362
|
0 |
29 |
unless ref $value eq 'HASH' |
367
|
0 |
29 |
if $_self |
376
|
21 |
8 |
scalar keys %$rejects ? : |
388
|
2 |
217 |
unless scalar @_ and ref $_[0] eq 'HASH' || ref $_[0] eq 'Brannigan::Tree' |
396
|
0 |
88 |
unless ref $_ eq 'HASH' |
399
|
28 |
53 |
if (ref $$_{$k} eq 'HASH') { } |
400
|
6 |
22 |
if (not exists $tree{$k}) { } |
406
|
2 |
51 |
if ($k eq 'forbidden' and $$_{$k}) { } |
|
6 |
82 |
elsif ($k eq 'required' and $$_{$k}) { } |