line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Valiemon::Attributes::AdditionalProperties; |
2
|
3
|
|
|
3
|
|
1524
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
73
|
|
3
|
3
|
|
|
3
|
|
9
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
62
|
|
4
|
3
|
|
|
3
|
|
10
|
use utf8; |
|
3
|
|
|
|
|
2
|
|
|
3
|
|
|
|
|
14
|
|
5
|
3
|
|
|
3
|
|
440
|
use parent qw(Valiemon::Attributes); |
|
3
|
|
|
|
|
307
|
|
|
3
|
|
|
|
|
12
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
146
|
use Carp qw(croak); |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
136
|
|
8
|
3
|
|
|
3
|
|
427
|
use List::MoreUtils qw(all); |
|
3
|
|
|
|
|
7472
|
|
|
3
|
|
|
|
|
19
|
|
9
|
|
|
|
|
|
|
|
10
|
8
|
|
|
8
|
0
|
19
|
sub attr_name { 'additionalProperties' } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub is_valid { |
13
|
37
|
|
|
37
|
0
|
47
|
my ($class, $context, $schema, $data) = @_; |
14
|
|
|
|
|
|
|
|
15
|
37
|
100
|
|
|
|
67
|
return 1 unless ref $data eq 'HASH'; # ignore |
16
|
|
|
|
|
|
|
|
17
|
35
|
|
|
|
|
41
|
my $additionalProperties = $schema->{additionalProperties}; |
18
|
35
|
50
|
|
|
|
52
|
return 1 unless defined $additionalProperties; |
19
|
35
|
100
|
|
|
|
82
|
return 1 if $additionalProperties; |
20
|
|
|
|
|
|
|
|
21
|
8
|
|
|
|
|
34
|
my $properties = $schema->{properties}; |
22
|
|
|
|
|
|
|
$context->in_attr($class, sub { |
23
|
|
|
|
|
|
|
all { |
24
|
13
|
|
|
|
|
26
|
exists $properties->{$_}; |
25
|
8
|
|
|
8
|
|
49
|
} keys %$data; |
26
|
8
|
|
|
|
|
46
|
}); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |