line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Valiemon::Attributes::AdditionalProperties; |
2
|
3
|
|
|
3
|
|
2045
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
114
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
73
|
|
4
|
3
|
|
|
3
|
|
15
|
use utf8; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
16
|
|
5
|
3
|
|
|
3
|
|
499
|
use parent qw(Valiemon::Attributes); |
|
3
|
|
|
|
|
282
|
|
|
3
|
|
|
|
|
16
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
178
|
use Carp qw(croak); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
147
|
|
8
|
3
|
|
|
3
|
|
546
|
use List::MoreUtils qw(all); |
|
3
|
|
|
|
|
12293
|
|
|
3
|
|
|
|
|
21
|
|
9
|
|
|
|
|
|
|
|
10
|
9
|
|
|
9
|
0
|
32
|
sub attr_name { 'additionalProperties' } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub is_valid { |
13
|
38
|
|
|
38
|
0
|
93
|
my ($class, $context, $schema, $data) = @_; |
14
|
|
|
|
|
|
|
|
15
|
38
|
100
|
|
|
|
104
|
return 1 unless ref $data eq 'HASH'; # ignore |
16
|
|
|
|
|
|
|
|
17
|
36
|
|
|
|
|
69
|
my $additionalProperties = $schema->{additionalProperties}; |
18
|
36
|
50
|
|
|
|
84
|
return 1 unless defined $additionalProperties; |
19
|
36
|
100
|
|
|
|
116
|
return 1 if $additionalProperties; |
20
|
|
|
|
|
|
|
|
21
|
9
|
|
|
|
|
74
|
my $properties = $schema->{properties}; |
22
|
|
|
|
|
|
|
$context->in_attr($class, sub { |
23
|
|
|
|
|
|
|
all { |
24
|
17
|
|
|
|
|
52
|
exists $properties->{$_}; |
25
|
9
|
|
|
9
|
|
60
|
} keys %$data; |
26
|
9
|
|
|
|
|
57
|
}); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |