| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
38
|
|
|
38
|
|
1868
|
use strict; |
|
|
38
|
|
|
|
|
97
|
|
|
|
38
|
|
|
|
|
1697
|
|
|
2
|
38
|
|
|
38
|
|
240
|
use warnings; |
|
|
38
|
|
|
|
|
105
|
|
|
|
38
|
|
|
|
|
3371
|
|
|
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.632'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
38
|
|
|
38
|
|
691
|
use 5.020; |
|
|
38
|
|
|
|
|
149
|
|
|
10
|
38
|
|
|
38
|
|
252
|
use Moo; |
|
|
38
|
|
|
|
|
108
|
|
|
|
38
|
|
|
|
|
313
|
|
|
11
|
38
|
|
|
38
|
|
17580
|
use strictures 2; |
|
|
38
|
|
|
|
|
363
|
|
|
|
38
|
|
|
|
|
1675
|
|
|
12
|
38
|
|
|
38
|
|
19026
|
use stable 0.031 'postderef'; |
|
|
38
|
|
|
|
|
740
|
|
|
|
38
|
|
|
|
|
708
|
|
|
13
|
38
|
|
|
38
|
|
8263
|
use experimental 'signatures'; |
|
|
38
|
|
|
|
|
171
|
|
|
|
38
|
|
|
|
|
359
|
|
|
14
|
38
|
|
|
38
|
|
3026
|
no autovivification warn => qw(fetch store exists delete); |
|
|
38
|
|
|
|
|
592
|
|
|
|
38
|
|
|
|
|
577
|
|
|
15
|
38
|
|
|
38
|
|
3430
|
use if "$]" >= 5.022, experimental => 're_strict'; |
|
|
38
|
|
|
|
|
340
|
|
|
|
38
|
|
|
|
|
1233
|
|
|
16
|
38
|
|
|
38
|
|
4461
|
no if "$]" >= 5.031009, feature => 'indirect'; |
|
|
38
|
|
|
|
|
101
|
|
|
|
38
|
|
|
|
|
4539
|
|
|
17
|
38
|
|
|
38
|
|
1192
|
no if "$]" >= 5.033001, feature => 'multidimensional'; |
|
|
38
|
|
|
|
|
94
|
|
|
|
38
|
|
|
|
|
3021
|
|
|
18
|
38
|
|
|
38
|
|
272
|
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
|
|
38
|
|
|
|
|
97
|
|
|
|
38
|
|
|
|
|
2749
|
|
|
19
|
38
|
|
|
38
|
|
273
|
no if "$]" >= 5.041009, feature => 'smartmatch'; |
|
|
38
|
|
|
|
|
126
|
|
|
|
38
|
|
|
|
|
2015
|
|
|
20
|
38
|
|
|
38
|
|
230
|
no feature 'switch'; |
|
|
38
|
|
|
|
|
117
|
|
|
|
38
|
|
|
|
|
1728
|
|
|
21
|
38
|
|
|
38
|
|
225
|
use JSON::Schema::Modern::Utilities qw(assert_keyword_type annotate_self); |
|
|
38
|
|
|
|
|
82
|
|
|
|
38
|
|
|
|
|
2986
|
|
|
22
|
38
|
|
|
38
|
|
487
|
use namespace::clean; |
|
|
38
|
|
|
|
|
81
|
|
|
|
38
|
|
|
|
|
347
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
with 'JSON::Schema::Modern::Vocabulary'; |
|
25
|
|
|
|
|
|
|
|
|
26
|
22
|
|
|
22
|
0
|
57
|
sub vocabulary ($class) { |
|
|
22
|
|
|
|
|
47
|
|
|
|
22
|
|
|
|
|
43
|
|
|
27
|
22
|
|
|
|
|
122
|
'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
|
5394
|
sub keywords ($class, $spec_version) { |
|
|
157
|
|
|
|
|
360
|
|
|
|
157
|
|
|
|
|
344
|
|
|
|
157
|
|
|
|
|
283
|
|
|
34
|
|
|
|
|
|
|
return ( |
|
35
|
157
|
100
|
|
|
|
5573
|
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
|
|
390
|
sub _traverse_keyword_title ($class, $schema, $state) { |
|
|
180
|
|
|
|
|
366
|
|
|
|
180
|
|
|
|
|
955
|
|
|
|
180
|
|
|
|
|
324
|
|
|
|
180
|
|
|
|
|
318
|
|
|
43
|
180
|
50
|
|
|
|
778
|
return if not assert_keyword_type($state, $schema, 'string'); |
|
44
|
180
|
|
|
|
|
665
|
return 1; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
1101
|
|
|
1101
|
|
2173
|
sub _eval_keyword_title ($class, $data, $schema, $state) { |
|
|
1101
|
|
|
|
|
2222
|
|
|
|
1101
|
|
|
|
|
2197
|
|
|
|
1101
|
|
|
|
|
2143
|
|
|
|
1101
|
|
|
|
|
2018
|
|
|
|
1101
|
|
|
|
|
1798
|
|
|
48
|
1101
|
|
|
|
|
4583
|
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
|
|
1036
|
sub _traverse_keyword_default { 1 } |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
*_eval_keyword_default = \&_eval_keyword_title; |
|
58
|
|
|
|
|
|
|
|
|
59
|
20
|
|
|
20
|
|
49
|
sub _traverse_keyword_deprecated ($class, $schema, $state) { |
|
|
20
|
|
|
|
|
48
|
|
|
|
20
|
|
|
|
|
41
|
|
|
|
20
|
|
|
|
|
41
|
|
|
|
20
|
|
|
|
|
36
|
|
|
60
|
20
|
|
|
|
|
87
|
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
|
|
57
|
sub _traverse_keyword_examples ($class, $schema, $state) { |
|
|
21
|
|
|
|
|
51
|
|
|
|
21
|
|
|
|
|
72
|
|
|
|
21
|
|
|
|
|
51
|
|
|
|
21
|
|
|
|
|
39
|
|
|
74
|
21
|
|
|
|
|
132
|
return assert_keyword_type($state, $schema, 'array'); |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
*_eval_keyword_examples = \&_eval_keyword_title; |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |