| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
38
|
|
|
38
|
|
1844
|
use strict; |
|
|
38
|
|
|
|
|
98
|
|
|
|
38
|
|
|
|
|
1737
|
|
|
2
|
38
|
|
|
38
|
|
226
|
use warnings; |
|
|
38
|
|
|
|
|
97
|
|
|
|
38
|
|
|
|
|
3542
|
|
|
3
|
|
|
|
|
|
|
package JSON::Schema::Modern::Vocabulary::MetaData; |
|
4
|
|
|
|
|
|
|
# vim: set ts=8 sts=2 sw=2 tw=100 et : |
|
5
|
|
|
|
|
|
|
# ABSTRACT: Implementation of the JSON Schema Meta-Data vocabulary |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.634'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
38
|
|
|
38
|
|
813
|
use 5.020; |
|
|
38
|
|
|
|
|
169
|
|
|
10
|
38
|
|
|
38
|
|
252
|
use Moo; |
|
|
38
|
|
|
|
|
104
|
|
|
|
38
|
|
|
|
|
291
|
|
|
11
|
38
|
|
|
38
|
|
16970
|
use strictures 2; |
|
|
38
|
|
|
|
|
327
|
|
|
|
38
|
|
|
|
|
1798
|
|
|
12
|
38
|
|
|
38
|
|
20368
|
use stable 0.031 'postderef'; |
|
|
38
|
|
|
|
|
1011
|
|
|
|
38
|
|
|
|
|
485
|
|
|
13
|
38
|
|
|
38
|
|
9199
|
use experimental 'signatures'; |
|
|
38
|
|
|
|
|
900
|
|
|
|
38
|
|
|
|
|
265
|
|
|
14
|
38
|
|
|
38
|
|
3398
|
no autovivification warn => qw(fetch store exists delete); |
|
|
38
|
|
|
|
|
105
|
|
|
|
38
|
|
|
|
|
307
|
|
|
15
|
38
|
|
|
38
|
|
4191
|
use if "$]" >= 5.022, experimental => 're_strict'; |
|
|
38
|
|
|
|
|
144
|
|
|
|
38
|
|
|
|
|
1547
|
|
|
16
|
38
|
|
|
38
|
|
4420
|
no if "$]" >= 5.031009, feature => 'indirect'; |
|
|
38
|
|
|
|
|
859
|
|
|
|
38
|
|
|
|
|
3821
|
|
|
17
|
38
|
|
|
38
|
|
1220
|
no if "$]" >= 5.033001, feature => 'multidimensional'; |
|
|
38
|
|
|
|
|
346
|
|
|
|
38
|
|
|
|
|
2802
|
|
|
18
|
38
|
|
|
38
|
|
255
|
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
|
|
38
|
|
|
|
|
316
|
|
|
|
38
|
|
|
|
|
2633
|
|
|
19
|
38
|
|
|
38
|
|
266
|
no if "$]" >= 5.041009, feature => 'smartmatch'; |
|
|
38
|
|
|
|
|
131
|
|
|
|
38
|
|
|
|
|
2005
|
|
|
20
|
38
|
|
|
38
|
|
232
|
no feature 'switch'; |
|
|
38
|
|
|
|
|
109
|
|
|
|
38
|
|
|
|
|
1674
|
|
|
21
|
38
|
|
|
38
|
|
251
|
use JSON::Schema::Modern::Utilities qw(assert_keyword_type annotate_self); |
|
|
38
|
|
|
|
|
340
|
|
|
|
38
|
|
|
|
|
3012
|
|
|
22
|
38
|
|
|
38
|
|
271
|
use namespace::clean; |
|
|
38
|
|
|
|
|
92
|
|
|
|
38
|
|
|
|
|
374
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
with 'JSON::Schema::Modern::Vocabulary'; |
|
25
|
|
|
|
|
|
|
|
|
26
|
22
|
|
|
22
|
0
|
54
|
sub vocabulary ($class) { |
|
|
22
|
|
|
|
|
43
|
|
|
|
22
|
|
|
|
|
42
|
|
|
27
|
22
|
|
|
|
|
100
|
'https://json-schema.org/draft/2019-09/vocab/meta-data' => 'draft2019-09', |
|
28
|
|
|
|
|
|
|
'https://json-schema.org/draft/2020-12/vocab/meta-data' => 'draft2020-12'; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
0
|
0
|
sub evaluation_order ($class) { 5 } |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
32
|
|
|
|
|
|
|
|
|
33
|
157
|
|
|
157
|
0
|
9908
|
sub keywords ($class, $spec_version) { |
|
|
157
|
|
|
|
|
384
|
|
|
|
157
|
|
|
|
|
333
|
|
|
|
157
|
|
|
|
|
346
|
|
|
34
|
|
|
|
|
|
|
return ( |
|
35
|
157
|
100
|
|
|
|
6185
|
qw(title description default), |
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
$spec_version !~ /^draft[467]\z/ ? 'deprecated' : (), |
|
37
|
|
|
|
|
|
|
$spec_version !~ /^draft[46]\z/ ? qw(readOnly writeOnly) : (), |
|
38
|
|
|
|
|
|
|
$spec_version ne 'draft4' ? 'examples' : (), |
|
39
|
|
|
|
|
|
|
); |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
180
|
|
|
180
|
|
422
|
sub _traverse_keyword_title ($class, $schema, $state) { |
|
|
180
|
|
|
|
|
406
|
|
|
|
180
|
|
|
|
|
439
|
|
|
|
180
|
|
|
|
|
323
|
|
|
|
180
|
|
|
|
|
330
|
|
|
43
|
180
|
50
|
|
|
|
937
|
return if not assert_keyword_type($state, $schema, 'string'); |
|
44
|
180
|
|
|
|
|
706
|
return 1; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
1101
|
|
|
1101
|
|
2215
|
sub _eval_keyword_title ($class, $data, $schema, $state) { |
|
|
1101
|
|
|
|
|
2274
|
|
|
|
1101
|
|
|
|
|
2051
|
|
|
|
1101
|
|
|
|
|
2057
|
|
|
|
1101
|
|
|
|
|
1868
|
|
|
|
1101
|
|
|
|
|
1865
|
|
|
48
|
1101
|
|
|
|
|
4435
|
annotate_self($state, $schema); |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
*_traverse_keyword_description = \&_traverse_keyword_title; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
*_eval_keyword_description = \&_eval_keyword_title; |
|
54
|
|
|
|
|
|
|
|
|
55
|
268
|
|
|
268
|
|
978
|
sub _traverse_keyword_default { 1 } |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
*_eval_keyword_default = \&_eval_keyword_title; |
|
58
|
|
|
|
|
|
|
|
|
59
|
20
|
|
|
20
|
|
42
|
sub _traverse_keyword_deprecated ($class, $schema, $state) { |
|
|
20
|
|
|
|
|
37
|
|
|
|
20
|
|
|
|
|
32
|
|
|
|
20
|
|
|
|
|
32
|
|
|
|
20
|
|
|
|
|
25
|
|
|
60
|
20
|
|
|
|
|
74
|
return assert_keyword_type($state, $schema, 'boolean'); |
|
61
|
|
|
|
|
|
|
} |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
*_eval_keyword_deprecated = \&_eval_keyword_title; |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
*_traverse_keyword_readOnly = \&_traverse_keyword_deprecated; |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
*_eval_keyword_readOnly = \&_eval_keyword_title; |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
*_traverse_keyword_writeOnly = \&_traverse_keyword_deprecated; |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
*_eval_keyword_writeOnly = \&_eval_keyword_title; |
|
72
|
|
|
|
|
|
|
|
|
73
|
21
|
|
|
21
|
|
65
|
sub _traverse_keyword_examples ($class, $schema, $state) { |
|
|
21
|
|
|
|
|
46
|
|
|
|
21
|
|
|
|
|
42
|
|
|
|
21
|
|
|
|
|
36
|
|
|
|
21
|
|
|
|
|
46
|
|
|
74
|
21
|
|
|
|
|
87
|
return assert_keyword_type($state, $schema, 'array'); |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
*_eval_keyword_examples = \&_eval_keyword_title; |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |