| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
38
|
|
|
38
|
|
1114
|
use strict; |
|
|
38
|
|
|
|
|
76
|
|
|
|
38
|
|
|
|
|
1806
|
|
|
2
|
38
|
|
|
38
|
|
159
|
use warnings; |
|
|
38
|
|
|
|
|
72
|
|
|
|
38
|
|
|
|
|
2905
|
|
|
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.637'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
38
|
|
|
38
|
|
683
|
use 5.020; |
|
|
38
|
|
|
|
|
471
|
|
|
10
|
38
|
|
|
38
|
|
171
|
use Moo; |
|
|
38
|
|
|
|
|
71
|
|
|
|
38
|
|
|
|
|
194
|
|
|
11
|
38
|
|
|
38
|
|
12078
|
use strictures 2; |
|
|
38
|
|
|
|
|
318
|
|
|
|
38
|
|
|
|
|
2641
|
|
|
12
|
38
|
|
|
38
|
|
13734
|
use stable 0.031 'postderef'; |
|
|
38
|
|
|
|
|
861
|
|
|
|
38
|
|
|
|
|
490
|
|
|
13
|
38
|
|
|
38
|
|
5391
|
use experimental 'signatures'; |
|
|
38
|
|
|
|
|
65
|
|
|
|
38
|
|
|
|
|
133
|
|
|
14
|
38
|
|
|
38
|
|
1832
|
no autovivification warn => qw(fetch store exists delete); |
|
|
38
|
|
|
|
|
64
|
|
|
|
38
|
|
|
|
|
246
|
|
|
15
|
38
|
|
|
38
|
|
2444
|
use if "$]" >= 5.022, experimental => 're_strict'; |
|
|
38
|
|
|
|
|
80
|
|
|
|
38
|
|
|
|
|
790
|
|
|
16
|
38
|
|
|
38
|
|
2642
|
no if "$]" >= 5.031009, feature => 'indirect'; |
|
|
38
|
|
|
|
|
70
|
|
|
|
38
|
|
|
|
|
2076
|
|
|
17
|
38
|
|
|
38
|
|
351
|
no if "$]" >= 5.033001, feature => 'multidimensional'; |
|
|
38
|
|
|
|
|
65
|
|
|
|
38
|
|
|
|
|
1883
|
|
|
18
|
38
|
|
|
38
|
|
436
|
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
|
|
38
|
|
|
|
|
69
|
|
|
|
38
|
|
|
|
|
1798
|
|
|
19
|
38
|
|
|
38
|
|
180
|
no if "$]" >= 5.041009, feature => 'smartmatch'; |
|
|
38
|
|
|
|
|
72
|
|
|
|
38
|
|
|
|
|
1412
|
|
|
20
|
38
|
|
|
38
|
|
341
|
no feature 'switch'; |
|
|
38
|
|
|
|
|
71
|
|
|
|
38
|
|
|
|
|
1321
|
|
|
21
|
38
|
|
|
38
|
|
186
|
use JSON::Schema::Modern::Utilities qw(assert_keyword_type annotate_self); |
|
|
38
|
|
|
|
|
59
|
|
|
|
38
|
|
|
|
|
2247
|
|
|
22
|
38
|
|
|
38
|
|
170
|
use namespace::clean; |
|
|
38
|
|
|
|
|
76
|
|
|
|
38
|
|
|
|
|
287
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
with 'JSON::Schema::Modern::Vocabulary'; |
|
25
|
|
|
|
|
|
|
|
|
26
|
22
|
|
|
22
|
0
|
34
|
sub vocabulary ($class) { |
|
|
22
|
|
|
|
|
39
|
|
|
|
22
|
|
|
|
|
33
|
|
|
27
|
22
|
|
|
|
|
73
|
'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
|
1074
|
sub keywords ($class, $spec_version) { |
|
|
157
|
|
|
|
|
289
|
|
|
|
157
|
|
|
|
|
288
|
|
|
|
157
|
|
|
|
|
212
|
|
|
34
|
|
|
|
|
|
|
return ( |
|
35
|
157
|
100
|
|
|
|
3641
|
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
|
|
321
|
sub _traverse_keyword_title ($class, $schema, $state) { |
|
|
180
|
|
|
|
|
298
|
|
|
|
180
|
|
|
|
|
254
|
|
|
|
180
|
|
|
|
|
261
|
|
|
|
180
|
|
|
|
|
274
|
|
|
43
|
180
|
50
|
|
|
|
519
|
return if not assert_keyword_type($state, $schema, 'string'); |
|
44
|
180
|
|
|
|
|
474
|
return 1; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
1101
|
|
|
1101
|
|
1634
|
sub _eval_keyword_title ($class, $data, $schema, $state) { |
|
|
1101
|
|
|
|
|
1571
|
|
|
|
1101
|
|
|
|
|
1459
|
|
|
|
1101
|
|
|
|
|
1456
|
|
|
|
1101
|
|
|
|
|
1404
|
|
|
|
1101
|
|
|
|
|
1384
|
|
|
48
|
1101
|
|
|
|
|
3154
|
annotate_self($state, $schema); |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
*_traverse_keyword_description = \&_traverse_keyword_title; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
*_eval_keyword_description = \&_eval_keyword_title; |
|
54
|
|
|
|
|
|
|
|
|
55
|
275
|
|
|
275
|
|
655
|
sub _traverse_keyword_default { 1 } |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
*_eval_keyword_default = \&_eval_keyword_title; |
|
58
|
|
|
|
|
|
|
|
|
59
|
20
|
|
|
20
|
|
32
|
sub _traverse_keyword_deprecated ($class, $schema, $state) { |
|
|
20
|
|
|
|
|
33
|
|
|
|
20
|
|
|
|
|
30
|
|
|
|
20
|
|
|
|
|
28
|
|
|
|
20
|
|
|
|
|
30
|
|
|
60
|
20
|
|
|
|
|
57
|
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
|
|
43
|
sub _traverse_keyword_examples ($class, $schema, $state) { |
|
|
21
|
|
|
|
|
32
|
|
|
|
21
|
|
|
|
|
36
|
|
|
|
21
|
|
|
|
|
30
|
|
|
|
21
|
|
|
|
|
30
|
|
|
74
|
21
|
|
|
|
|
142
|
return assert_keyword_type($state, $schema, 'array'); |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
*_eval_keyword_examples = \&_eval_keyword_title; |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |