line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Valiemon::Attributes::AdditionalProperties; |
2
|
1
|
|
|
1
|
|
670
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
4
|
1
|
|
|
1
|
|
25
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
5
|
1
|
|
|
1
|
|
567
|
use parent qw(Valiemon::Attributes); |
|
1
|
|
|
|
|
373
|
|
|
1
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
80
|
use Carp qw(croak); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
86
|
|
8
|
1
|
|
|
1
|
|
770
|
use List::MoreUtils qw(all); |
|
1
|
|
|
|
|
13220
|
|
|
1
|
|
|
|
|
10
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
0
|
8
|
sub attr_name { 'additionalProperties' } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub is_valid { |
13
|
3
|
|
|
3
|
0
|
6
|
my ($class, $context, $schema, $data) = @_; |
14
|
|
|
|
|
|
|
|
15
|
3
|
50
|
|
|
|
11
|
return 1 unless ref $data eq 'HASH'; # ignore |
16
|
|
|
|
|
|
|
|
17
|
3
|
|
|
|
|
7
|
my $additionalProperties = $schema->{additionalProperties}; |
18
|
3
|
50
|
|
|
|
9
|
return 1 unless defined $additionalProperties; |
19
|
3
|
100
|
|
|
|
8
|
return 1 if $additionalProperties; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
5
|
my $properties = $schema->{properties}; |
22
|
|
|
|
|
|
|
$context->in_attr($class, sub { |
23
|
|
|
|
|
|
|
all { |
24
|
5
|
|
|
|
|
12
|
exists $properties->{$_}; |
25
|
2
|
|
|
2
|
|
26
|
} keys %$data; |
26
|
2
|
|
|
|
|
18
|
}); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |