line |
true |
false |
branch |
45
|
27 |
17 |
if ($args{'type'} eq 'parameters') { } |
61
|
43 |
75 |
if ($spec->type eq 'flag') |
62
|
16 |
27 |
if ($spec->multiple) { } |
63
|
0 |
16 |
if (defined $value and not $value =~ /^\d+$/) |
68
|
0 |
27 |
if (defined $value and $value != 1) |
76
|
5 |
70 |
if ($spec->multiple and $spec->mapping) { } |
|
10 |
60 |
elsif ($spec->multiple) { } |
77
|
0 |
5 |
unless (defined $value) |
82
|
0 |
5 |
unless (keys %$values) |
83
|
0 |
0 |
if (defined(my $default = $spec->default)) |
89
|
0 |
5 |
if (not keys %$values and $spec->required) |
94
|
0 |
5 |
unless (keys %$values) |
100
|
0 |
10 |
unless (defined $value) |
105
|
6 |
4 |
unless (@$values) |
106
|
0 |
6 |
if (defined(my $default = $spec->default)) |
112
|
6 |
4 |
if (not @$values and $spec->required) |
117
|
0 |
4 |
unless (@$values) |
121
|
1 |
3 |
if ($spec->unique and &uniq(@$values) != @$values) |
129
|
33 |
27 |
unless (defined $value) |
130
|
0 |
33 |
if (defined(my $default = $spec->default)) |
136
|
4 |
56 |
if (not defined $value and $spec->required) |
141
|
29 |
27 |
unless (defined $value) |
149
|
0 |
35 |
if (ref $param_type eq 'HASH') |
152
|
0 |
35 |
unless my $code = $validate{$param_type} |
155
|
5 |
30 |
$spec->mapping ? : |
156
|
22 |
13 |
if (my $spec_values = $spec->values) |
157
|
17 |
5 |
if (my $op = $spec_values->{'op'}) { } |
|
5 |
0 |
elsif ($spec->mapping) { } |
173
|
5 |
30 |
$spec->mapping ? : |
177
|
6 |
31 |
if ($spec->mapping) { } |
185
|
3 |
34 |
unless ($ok) |
189
|
7 |
30 |
if ($enum) |
191
|
0 |
7 |
unless my $code = $validate{'enum'} |
193
|
1 |
6 |
unless ($ok) |
197
|
0 |
37 |
if ($param_type eq 'file' and $v eq '-') |
203
|
6 |
31 |
if ($spec->mapping and keys %$possible_values) { } |
|
15 |
16 |
elsif (@$possible_values) { } |
205
|
3 |
3 |
if (exists $possible_values->{$key}) |
206
|
2 |
1 |
if (my $list = $possible_values->{$key}) { } |
214
|
3 |
3 |
unless ($ok) |
220
|
7 |
14 |
XXX ? : |
222
|
2 |
13 |
unless ($ok) |
228
|
14 |
30 |
keys %$errs ? : |