line |
true |
false |
branch |
29
|
10 |
16 |
if (not $ref) { }
|
|
9 |
7 |
elsif ($ref eq 'HASH') { }
|
|
7 |
0 |
elsif ($ref eq 'ARRAY') { }
|
45
|
1 |
0 |
if (not exists $rule->{'type'} and $rule->{'arrayof'})
|
50
|
26 |
0 |
if ($rule->{'type'}) { }
|
52
|
7 |
19 |
if ($expected_type ne 'any' and $expected_type ne $type)
|
65
|
4 |
15 |
if ($type eq 'array') { }
|
|
7 |
8 |
elsif ($type eq 'hash') { }
|
72
|
5 |
14 |
if ($validation and $validation->{'valid'} == 0)
|
87
|
2 |
2 |
if (my $item_rule = $rule->{'arrayof'})
|
92
|
2 |
3 |
unless ($validation->{'valid'})
|
93
|
2 |
0 |
if ($validation->{'error'}) { }
|
107
|
1 |
3 |
if (scalar @$errors) { }
|
123
|
5 |
2 |
if (my $item_rules = $rule->{'items'})
|
127
|
2 |
10 |
if (not exists $data->{$field}) { }
|
129
|
1 |
1 |
if ($item_rule->{'required'})
|
143
|
3 |
7 |
unless ($validation->{'valid'})
|
144
|
2 |
1 |
if ($validation->{'error'}) { }
|
158
|
5 |
0 |
unless ($rule->{'ignore_extra_items'})
|
161
|
10 |
1 |
if exists $item_rules->{$k}
|
172
|
3 |
4 |
scalar @$errors == 0 ? :
|