line |
true |
false |
branch |
25
|
0 |
2 |
if ($] < 5.006) |
36
|
16 |
16 |
if (@{$$self{'errors'};}) { } |
62
|
1 |
125 |
unless (UNIVERSAL::isa($schema, 'HASH')) |
67
|
0 |
125 |
unless (defined $type) |
71
|
1 |
124 |
unless ($self->can($type_check_method)) |
82
|
154 |
0 |
if (defined $$schema{$schema_key}) |
83
|
4 |
150 |
if ($schema_key eq 'pattern') { } |
|
8 |
142 |
elsif ($schema_key eq 'length') { } |
|
3 |
139 |
elsif ($schema_key eq 'enum') { } |
|
8 |
131 |
elsif ($schema_key eq 'range') { } |
|
0 |
131 |
elsif ($schema_key eq 'assert') { } |
|
1 |
130 |
elsif (not $schema_key =~ /^(type|required|unique|name|classname|class|desc)$/) { } |
85
|
1 |
3 |
unless ($data =~ qr/$pattern/) |
89
|
1 |
7 |
unless (UNIVERSAL::isa($$schema{'length'}, 'HASH')) |
94
|
0 |
13 |
if ($sub_schema_key eq 'min') { } |
|
6 |
7 |
elsif ($sub_schema_key eq 'min-ex') { } |
|
2 |
5 |
elsif ($sub_schema_key eq 'max') { } |
|
4 |
1 |
elsif ($sub_schema_key eq 'max-ex') { } |
96
|
0 |
0 |
if ($length < $min) |
101
|
1 |
5 |
if ($length <= $min) |
106
|
1 |
1 |
if ($length > $max) |
111
|
1 |
3 |
if ($length >= $max) |
119
|
1 |
2 |
unless (UNIVERSAL::isa($$schema{'enum'}, 'ARRAY')) |
123
|
0 |
2 |
unless (exists $valid{$data}) |
127
|
1 |
7 |
unless (UNIVERSAL::isa($$schema{'range'}, 'HASH')) |
150
|
0 |
13 |
if ($sub_schema_key eq 'min') { } |
|
6 |
7 |
elsif ($sub_schema_key eq 'min-ex') { } |
|
2 |
5 |
elsif ($sub_schema_key eq 'max') { } |
|
4 |
1 |
elsif ($sub_schema_key eq 'max-ex') { } |
152
|
0 |
0 |
if (&$lt($data, $min)) |
157
|
1 |
5 |
if (&$le($data, $min)) |
162
|
1 |
1 |
if (&$gt($data, $max)) |
167
|
1 |
3 |
if (&$ge($data, $max)) |
185
|
3 |
13 |
if (not defined $data or ref $data) |
186
|
2 |
1 |
defined $data ? : |
193
|
2 |
50 |
if (not defined $data or ref $data or $data =~ /^\d+(\.\d+)?$/) |
194
|
2 |
1 |
defined $data ? : |
201
|
2 |
6 |
unless ($data =~ /^[+-]?\d+$/) |
209
|
0 |
0 |
unless ($data =~ /^[+-]?\d+\.\d+$/) |
217
|
0 |
0 |
unless ($data =~ /^[+-]?\d+(\.\d+)?$/) |
225
|
0 |
0 |
unless ($data =~ /^(yes|true|1|no|false|0)$/) |
238
|
0 |
0 |
unless ($data =~ /^\d{4}-\d{2}-\d{2}$/) |
246
|
0 |
0 |
unless ($data =~ /^\d{2}:\d{2}:\d{2}$/) |
264
|
0 |
16 |
unless (exists $$schema{'sequence'}) |
268
|
0 |
16 |
unless (UNIVERSAL::isa($sequence, 'ARRAY')) |
271
|
0 |
16 |
if (@$sequence != 1) |
274
|
0 |
16 |
unless (UNIVERSAL::isa($data, 'ARRAY')) |
279
|
0 |
16 |
if $$self{'done'}{overload::StrVal($data)}{overload::StrVal($schema)} |
290
|
26 |
12 |
if ($unique) |
291
|
2 |
24 |
if (exists $unique_val{$elem}) { } |
304
|
12 |
13 |
if ($args and $$args{'unique_mapping_val'}) |
307
|
0 |
25 |
unless (exists $$schema{'mapping'}) |
311
|
0 |
25 |
unless (UNIVERSAL::isa($mapping, 'HASH')) |
314
|
0 |
25 |
unless (defined $data) |
318
|
1 |
24 |
unless (UNIVERSAL::isa($data, 'HASH')) |
323
|
0 |
24 |
if $$self{'done'}{overload::StrVal($data)}{overload::StrVal($schema)} |
335
|
0 |
60 |
if ($key eq '=') |
341
|
0 |
60 |
unless (UNIVERSAL::isa($subschema, 'HASH')) |
345
|
12 |
48 |
unless (exists $$data{$key}) |
346
|
0 |
12 |
if ($required) { } |
355
|
12 |
36 |
if ($unique) |
356
|
2 |
10 |
if (defined $$unique_mapping_val{$$data{$key}}{'val'} and $$unique_mapping_val{$$data{$key}}{'val'} eq $$data{$key}) { } |
375
|
0 |
48 |
unless ($seen_key{$key}) |
376
|
0 |
0 |
if ($default_key_schema) { } |
401
|
98 |
48 |
!($root =~ m[/$]) ? : |
412
|
36 |
88 |
if defined $val |