line |
true |
false |
branch |
22
|
0 |
489 |
if (defined $specs and ref $specs ne 'HASH') |
31
|
486 |
3 |
if (defined $specs and keys %$specs) |
45
|
709 |
1468 |
if ($error) |
56
|
486 |
0 |
wantarray ? : |
223
|
490 |
486 |
unless (defined $specs) |
230
|
4 |
972 |
unless defined $specs |
237
|
2 |
970 |
unless ($self->hash($params)) |
260
|
2 |
1477 |
unless ($self->hash($specs)) |
267
|
2 |
4939 |
unless ($self->hash($spec)) |
273
|
4937 |
2 |
exists $spec->{'type'} ? : |
276
|
1 |
4938 |
unless (exists $specs_of_specs{$type}) |
283
|
3 |
4935 |
unless ($self->_validate($spec, $spec_of_spec, 'skip_specs_validation')) |
289
|
0 |
4935 |
if (exists $spec->{'of'} and not $self->validate_specs({'of', $spec->{'of'}}, $p2v)) |
304
|
3 |
5905 |
unless $self->required_params($params, $specs) |
308
|
3 |
5902 |
unless $self->unknown_params($params, $specs) |
310
|
0 |
483 |
unless ($skip_specs_validation or $self->validate_specs($specs)) |
315
|
0 |
9923 |
unless (exists $specs->{$name}) |
322
|
693 |
9230 |
unless $valid |
336
|
5490 |
0 |
if (exists $spec->{'required'} and $spec->{'required'}) |
337
|
3 |
5487 |
unless (exists $params->{$par}) |
354
|
3 |
9926 |
unless (exists $specs->{$par}) |
374
|
78 |
10763 |
if ($undef and not defined $value) |
380
|
4954 |
5809 |
if ($type eq 'enum') |
382
|
19 |
4935 |
unless (exists $spec->{$VALUES_OF_ENUM}) |
390
|
553 |
10210 |
unless ($validate{$type}->($value, @other)) |
396
|
54 |
10156 |
if (exists $spec->{'gt'}) |
397
|
30 |
24 |
if ($spec->{'gt'} >= $value) |
404
|
54 |
10126 |
if (exists $spec->{'ge'}) |
405
|
10 |
44 |
if ($spec->{'ge'} > $value) |
412
|
68 |
10102 |
if (exists $spec->{'lt'}) |
413
|
44 |
24 |
if ($spec->{'lt'} <= $value) |
420
|
62 |
10064 |
if (exists $spec->{'le'}) |
421
|
24 |
38 |
if ($spec->{'le'} < $value) |
428
|
16 |
10086 |
if (exists $spec->{'min_length'}) |
429
|
8 |
8 |
if ($spec->{'min_length'} > length($value // '')) |
436
|
16 |
10078 |
if (exists $spec->{'max_length'}) |
437
|
8 |
8 |
if ($spec->{'max_length'} < length($value // '')) |
444
|
620 |
9466 |
if (exists $spec->{'of'}) |
446
|
78 |
542 |
if ($type eq 'array') { } |
|
542 |
0 |
elsif ($type eq 'hash') { } |
457
|
18 |
602 |
unless (@values) |
458
|
12 |
6 |
unless (exists $spec->{'empty'} and $spec->{'empty'}) |
466
|
10 |
908 |
unless $self->validate_value($v, $spec->{'of'}) |
471
|
8 |
10056 |
if (exists $spec->{'callback'}) |
472
|
4 |
4 |
unless ($spec->{'callback'}->($value, @other)) |