| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
20
|
|
|
20
|
|
12607
|
use strict; |
|
|
20
|
|
|
|
|
126
|
|
|
|
20
|
|
|
|
|
714
|
|
|
2
|
20
|
|
|
20
|
|
123
|
use warnings; |
|
|
20
|
|
|
|
|
60
|
|
|
|
20
|
|
|
|
|
1230
|
|
|
3
|
|
|
|
|
|
|
package JSON::Schema::Draft201909::Vocabulary::MetaData; |
|
4
|
|
|
|
|
|
|
# vim: set ts=8 sts=2 sw=2 tw=100 et : |
|
5
|
|
|
|
|
|
|
# ABSTRACT: Implementation of the JSON Schema Draft 2019-09 Meta-Data vocabulary |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.028'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
20
|
|
|
20
|
|
419
|
use 5.016; |
|
|
20
|
|
|
|
|
78
|
|
|
10
|
20
|
|
|
20
|
|
127
|
no if "$]" >= 5.031009, feature => 'indirect'; |
|
|
20
|
|
|
|
|
50
|
|
|
|
20
|
|
|
|
|
599
|
|
|
11
|
20
|
|
|
20
|
|
1100
|
no if "$]" >= 5.033001, feature => 'multidimensional'; |
|
|
20
|
|
|
|
|
67
|
|
|
|
20
|
|
|
|
|
182
|
|
|
12
|
20
|
|
|
20
|
|
1078
|
no if "$]" >= 5.033006, feature => 'bareword_filehandles'; |
|
|
20
|
|
|
|
|
77
|
|
|
|
20
|
|
|
|
|
151
|
|
|
13
|
20
|
|
|
20
|
|
882
|
use strictures 2; |
|
|
20
|
|
|
|
|
181
|
|
|
|
20
|
|
|
|
|
833
|
|
|
14
|
20
|
|
|
20
|
|
4146
|
use JSON::Schema::Draft201909::Utilities qw(assert_keyword_type annotate_self); |
|
|
20
|
|
|
|
|
43
|
|
|
|
20
|
|
|
|
|
1421
|
|
|
15
|
20
|
|
|
20
|
|
135
|
use Moo; |
|
|
20
|
|
|
|
|
78
|
|
|
|
20
|
|
|
|
|
185
|
|
|
16
|
20
|
|
|
20
|
|
8098
|
use namespace::clean; |
|
|
20
|
|
|
|
|
91
|
|
|
|
20
|
|
|
|
|
155
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
with 'JSON::Schema::Draft201909::Vocabulary'; |
|
19
|
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
0
|
0
|
sub vocabulary { 'https://json-schema.org/draft/2019-09/vocab/meta-data' } |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub keywords { |
|
23
|
15114
|
|
|
15114
|
0
|
45763
|
qw(title description default deprecated readOnly writeOnly examples); |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub _traverse_keyword_title { |
|
27
|
57
|
|
|
57
|
|
152
|
my ($self, $schema, $state) = @_; |
|
28
|
57
|
50
|
|
|
|
175
|
return if not assert_keyword_type($state, $schema, 'string'); |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _eval_keyword_title { |
|
32
|
481
|
|
|
481
|
|
1115
|
my ($self, $data, $schema, $state) = @_; |
|
33
|
481
|
|
|
|
|
1374
|
annotate_self($state, $schema); |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
8
|
|
|
8
|
|
25
|
sub _traverse_keyword_description { goto \&_traverse_keyword_title } |
|
37
|
|
|
|
|
|
|
|
|
38
|
27
|
|
|
27
|
|
85
|
sub _eval_keyword_description { goto \&_eval_keyword_title } |
|
39
|
|
|
|
|
|
|
|
|
40
|
41
|
|
|
41
|
|
151
|
sub _eval_keyword_default { goto \&_eval_keyword_title } |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub _traverse_keyword_deprecated { |
|
43
|
0
|
|
|
0
|
|
0
|
my ($self, $schema, $state) = @_; |
|
44
|
0
|
0
|
|
|
|
0
|
return if not assert_keyword_type($state, $schema, 'boolean'); |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
|
0
|
sub _eval_keyword_deprecated { goto \&_eval_keyword_title } |
|
48
|
|
|
|
|
|
|
|
|
49
|
0
|
|
|
0
|
|
0
|
sub _traverse_keyword_readOnly { goto \&_traverse_keyword_deprecated } |
|
50
|
|
|
|
|
|
|
|
|
51
|
0
|
|
|
0
|
|
0
|
sub _eval_keyword_readOnly { goto \&_eval_keyword_title } |
|
52
|
|
|
|
|
|
|
|
|
53
|
0
|
|
|
0
|
|
0
|
sub _traverse_keyword_writeOnly { goto \&_traverse_keyword_deprecated } |
|
54
|
|
|
|
|
|
|
|
|
55
|
0
|
|
|
0
|
|
0
|
sub _eval_keyword_writeOnly { goto \&_eval_keyword_title } |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub _traverse_keyword_examples { |
|
58
|
5
|
|
|
5
|
|
15
|
my ($self, $schema, $state) = @_; |
|
59
|
5
|
50
|
|
|
|
21
|
return if not assert_keyword_type($state, $schema, 'array'); |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
3
|
|
|
3
|
|
18
|
sub _eval_keyword_examples { goto \&_eval_keyword_title } |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__END__ |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=pod |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=encoding UTF-8 |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 NAME |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
JSON::Schema::Draft201909::Vocabulary::MetaData - Implementation of the JSON Schema Draft 2019-09 Meta-Data vocabulary |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 VERSION |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
version 0.028 |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=for Pod::Coverage vocabulary keywords |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=for stopwords metaschema |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Implementation of the JSON Schema Draft 2019-09 "Meta-Data" vocabulary, indicated in metaschemas |
|
87
|
|
|
|
|
|
|
with the URI C<https://json-schema.org/draft/2019-09/vocab/meta-data> and formally specified in |
|
88
|
|
|
|
|
|
|
L<https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9>. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 SUPPORT |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/karenetheridge/JSON-Schema-Draft201909/issues>. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
I am also usually active on irc, as 'ether' at C<irc.perl.org> and C<irc.libera.chat>. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 AUTHOR |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Karen Etheridge <ether@cpan.org> |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Karen Etheridge. |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
105
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |