| line | stmt | bran | cond | sub | pod | time | code | 
| 1 | 31 |  |  | 31 |  | 16307 | use strict; | 
|  | 31 |  |  |  |  | 122 |  | 
|  | 31 |  |  |  |  | 1209 |  | 
| 2 | 31 |  |  | 31 |  | 320 | use warnings; | 
|  | 31 |  |  |  |  | 85 |  | 
|  | 31 |  |  |  |  | 1672 |  | 
| 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.570'; | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 31 |  |  | 31 |  | 555 | use 5.020; | 
|  | 31 |  |  |  |  | 157 |  | 
| 10 | 31 |  |  | 31 |  | 256 | use Moo; | 
|  | 31 |  |  |  |  | 95 |  | 
|  | 31 |  |  |  |  | 217 |  | 
| 11 | 31 |  |  | 31 |  | 11932 | use strictures 2; | 
|  | 31 |  |  |  |  | 595 |  | 
|  | 31 |  |  |  |  | 1222 |  | 
| 12 | 31 |  |  | 31 |  | 5943 | use stable 0.031 'postderef'; | 
|  | 31 |  |  |  |  | 938 |  | 
|  | 31 |  |  |  |  | 207 |  | 
| 13 | 31 |  |  | 31 |  | 4884 | use experimental 'signatures'; | 
|  | 31 |  |  |  |  | 312 |  | 
|  | 31 |  |  |  |  | 338 |  | 
| 14 | 31 |  |  | 31 |  | 2621 | use if "$]" >= 5.022, experimental => 're_strict'; | 
|  | 31 |  |  |  |  | 246 |  | 
|  | 31 |  |  |  |  | 374 |  | 
| 15 | 31 |  |  | 31 |  | 2973 | no if "$]" >= 5.031009, feature => 'indirect'; | 
|  | 31 |  |  |  |  | 106 |  | 
|  | 31 |  |  |  |  | 399 |  | 
| 16 | 31 |  |  | 31 |  | 3026 | no if "$]" >= 5.033001, feature => 'multidimensional'; | 
|  | 31 |  |  |  |  | 131 |  | 
|  | 31 |  |  |  |  | 223 |  | 
| 17 | 31 |  |  | 31 |  | 1537 | no if "$]" >= 5.033006, feature => 'bareword_filehandles'; | 
|  | 31 |  |  |  |  | 133 |  | 
|  | 31 |  |  |  |  | 213 |  | 
| 18 | 31 |  |  | 31 |  | 1731 | use JSON::Schema::Modern::Utilities qw(assert_keyword_type annotate_self); | 
|  | 31 |  |  |  |  | 95 |  | 
|  | 31 |  |  |  |  | 1982 |  | 
| 19 | 31 |  |  | 31 |  | 256 | use namespace::clean; | 
|  | 31 |  |  |  |  | 101 |  | 
|  | 31 |  |  |  |  | 641 |  | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | with 'JSON::Schema::Modern::Vocabulary'; | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | sub vocabulary { | 
| 24 | 15 |  |  | 15 | 0 | 93 | 'https://json-schema.org/draft/2019-09/vocab/meta-data' => 'draft2019-09', | 
| 25 |  |  |  |  |  |  | 'https://json-schema.org/draft/2020-12/vocab/meta-data' => 'draft2020-12'; | 
| 26 |  |  |  |  |  |  | } | 
| 27 |  |  |  |  |  |  |  | 
| 28 | 0 |  |  | 0 | 0 | 0 | sub evaluation_order { 5 } | 
| 29 |  |  |  |  |  |  |  | 
| 30 | 90 |  |  | 90 | 0 | 246 | sub keywords ($self, $spec_version) { | 
|  | 90 |  |  |  |  | 190 |  | 
|  | 90 |  |  |  |  | 199 |  | 
|  | 90 |  |  |  |  | 159 |  | 
| 31 |  |  |  |  |  |  | return ( | 
| 32 | 90 | 100 |  |  |  | 2452 | qw(title description default), | 
| 33 |  |  |  |  |  |  | $spec_version ne 'draft7' ? 'deprecated' : (), | 
| 34 |  |  |  |  |  |  | qw(readOnly writeOnly examples), | 
| 35 |  |  |  |  |  |  | ); | 
| 36 |  |  |  |  |  |  | } | 
| 37 |  |  |  |  |  |  |  | 
| 38 | 196 |  |  | 196 |  | 367 | sub _traverse_keyword_title ($self, $schema, $state) { | 
|  | 196 |  |  |  |  | 378 |  | 
|  | 196 |  |  |  |  | 316 |  | 
|  | 196 |  |  |  |  | 332 |  | 
|  | 196 |  |  |  |  | 306 |  | 
| 39 | 196 | 50 |  |  |  | 591 | return if not assert_keyword_type($state, $schema, 'string'); | 
| 40 | 196 |  |  |  |  | 644 | return 1; | 
| 41 |  |  |  |  |  |  | } | 
| 42 |  |  |  |  |  |  |  | 
| 43 | 1603 |  |  | 1603 |  | 2643 | sub _eval_keyword_title ($self, $data, $schema, $state) { | 
|  | 1603 |  |  |  |  | 2596 |  | 
|  | 1603 |  |  |  |  | 2500 |  | 
|  | 1603 |  |  |  |  | 2405 |  | 
|  | 1603 |  |  |  |  | 2278 |  | 
|  | 1603 |  |  |  |  | 2537 |  | 
| 44 | 1603 |  |  |  |  | 4581 | annotate_self($state, $schema); | 
| 45 |  |  |  |  |  |  | } | 
| 46 |  |  |  |  |  |  |  | 
| 47 | 60 |  |  | 60 |  | 275 | sub _traverse_keyword_description { goto \&_traverse_keyword_title } | 
| 48 |  |  |  |  |  |  |  | 
| 49 | 101 |  |  | 101 |  | 397 | sub _eval_keyword_description { goto \&_eval_keyword_title } | 
| 50 |  |  |  |  |  |  |  | 
| 51 | 207 |  |  | 207 |  | 560 | sub _traverse_keyword_default { 1 } | 
| 52 |  |  |  |  |  |  |  | 
| 53 | 94 |  |  | 94 |  | 460 | sub _eval_keyword_default { goto \&_eval_keyword_title } | 
| 54 |  |  |  |  |  |  |  | 
| 55 | 20 |  |  | 20 |  | 38 | sub _traverse_keyword_deprecated ($self, $schema, $state) { | 
|  | 20 |  |  |  |  | 54 |  | 
|  | 20 |  |  |  |  | 34 |  | 
|  | 20 |  |  |  |  | 35 |  | 
|  | 20 |  |  |  |  | 31 |  | 
| 56 | 20 | 50 |  |  |  | 56 | return if not assert_keyword_type($state, $schema, 'boolean'); | 
| 57 | 20 |  |  |  |  | 272 | return 1; | 
| 58 |  |  |  |  |  |  | } | 
| 59 |  |  |  |  |  |  |  | 
| 60 | 0 |  |  | 0 |  | 0 | sub _eval_keyword_deprecated { goto \&_eval_keyword_title } | 
| 61 |  |  |  |  |  |  |  | 
| 62 | 0 |  |  | 0 |  | 0 | sub _traverse_keyword_readOnly { goto \&_traverse_keyword_deprecated } | 
| 63 |  |  |  |  |  |  |  | 
| 64 | 0 |  |  | 0 |  | 0 | sub _eval_keyword_readOnly { goto \&_eval_keyword_title } | 
| 65 |  |  |  |  |  |  |  | 
| 66 | 0 |  |  | 0 |  | 0 | sub _traverse_keyword_writeOnly { goto \&_traverse_keyword_deprecated } | 
| 67 |  |  |  |  |  |  |  | 
| 68 | 0 |  |  | 0 |  | 0 | sub _eval_keyword_writeOnly { goto \&_eval_keyword_title } | 
| 69 |  |  |  |  |  |  |  | 
| 70 | 13 |  |  | 13 |  | 29 | sub _traverse_keyword_examples ($self, $schema, $state) { | 
|  | 13 |  |  |  |  | 26 |  | 
|  | 13 |  |  |  |  | 26 |  | 
|  | 13 |  |  |  |  | 25 |  | 
|  | 13 |  |  |  |  | 21 |  | 
| 71 | 13 | 50 |  |  |  | 43 | return if not assert_keyword_type($state, $schema, 'array'); | 
| 72 | 13 |  |  |  |  | 40 | return 1; | 
| 73 |  |  |  |  |  |  | } | 
| 74 |  |  |  |  |  |  |  | 
| 75 | 9 |  |  | 9 |  | 48 | sub _eval_keyword_examples { goto \&_eval_keyword_title } | 
| 76 |  |  |  |  |  |  |  | 
| 77 |  |  |  |  |  |  | 1; | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | __END__ | 
| 80 |  |  |  |  |  |  |  | 
| 81 |  |  |  |  |  |  | =pod | 
| 82 |  |  |  |  |  |  |  | 
| 83 |  |  |  |  |  |  | =encoding UTF-8 | 
| 84 |  |  |  |  |  |  |  | 
| 85 |  |  |  |  |  |  | =head1 NAME | 
| 86 |  |  |  |  |  |  |  | 
| 87 |  |  |  |  |  |  | JSON::Schema::Modern::Vocabulary::MetaData - Implementation of the JSON Schema Meta-Data vocabulary | 
| 88 |  |  |  |  |  |  |  | 
| 89 |  |  |  |  |  |  | =head1 VERSION | 
| 90 |  |  |  |  |  |  |  | 
| 91 |  |  |  |  |  |  | version 0.570 | 
| 92 |  |  |  |  |  |  |  | 
| 93 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 94 |  |  |  |  |  |  |  | 
| 95 |  |  |  |  |  |  | =for Pod::Coverage vocabulary evaluation_order keywords | 
| 96 |  |  |  |  |  |  |  | 
| 97 |  |  |  |  |  |  | =for stopwords metaschema | 
| 98 |  |  |  |  |  |  |  | 
| 99 |  |  |  |  |  |  | Implementation of the JSON Schema Draft 2020-12 "Meta-Data" vocabulary, indicated in metaschemas | 
| 100 |  |  |  |  |  |  | with the URI C<https://json-schema.org/draft/2020-12/vocab/meta-data> and formally specified in | 
| 101 |  |  |  |  |  |  | L<https://json-schema.org/draft/2020-12/json-schema-validation.html#section-9>. | 
| 102 |  |  |  |  |  |  |  | 
| 103 |  |  |  |  |  |  | Support is also provided for | 
| 104 |  |  |  |  |  |  |  | 
| 105 |  |  |  |  |  |  | =over 4 | 
| 106 |  |  |  |  |  |  |  | 
| 107 |  |  |  |  |  |  | =item * | 
| 108 |  |  |  |  |  |  |  | 
| 109 |  |  |  |  |  |  | the equivalent Draft 2019-09 keywords, indicated in metaschemas with the URI C<https://json-schema.org/draft/2019-09/vocab/meta-data> and formally specified in L<https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-02#section-9>. | 
| 110 |  |  |  |  |  |  |  | 
| 111 |  |  |  |  |  |  | =item * | 
| 112 |  |  |  |  |  |  |  | 
| 113 |  |  |  |  |  |  | the equivalent Draft 7 keywords that correspond to this vocabulary and are formally specified in L<https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-10>. | 
| 114 |  |  |  |  |  |  |  | 
| 115 |  |  |  |  |  |  | =back | 
| 116 |  |  |  |  |  |  |  | 
| 117 |  |  |  |  |  |  | =for stopwords OpenAPI | 
| 118 |  |  |  |  |  |  |  | 
| 119 |  |  |  |  |  |  | =head1 SUPPORT | 
| 120 |  |  |  |  |  |  |  | 
| 121 |  |  |  |  |  |  | Bugs may be submitted through L<https://github.com/karenetheridge/JSON-Schema-Modern/issues>. | 
| 122 |  |  |  |  |  |  |  | 
| 123 |  |  |  |  |  |  | I am also usually active on irc, as 'ether' at C<irc.perl.org> and C<irc.libera.chat>. | 
| 124 |  |  |  |  |  |  |  | 
| 125 |  |  |  |  |  |  | You can also find me on the L<JSON Schema Slack server|https://json-schema.slack.com> and L<OpenAPI Slack | 
| 126 |  |  |  |  |  |  | server|https://open-api.slack.com>, which are also great resources for finding help. | 
| 127 |  |  |  |  |  |  |  | 
| 128 |  |  |  |  |  |  | =head1 AUTHOR | 
| 129 |  |  |  |  |  |  |  | 
| 130 |  |  |  |  |  |  | Karen Etheridge <ether@cpan.org> | 
| 131 |  |  |  |  |  |  |  | 
| 132 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENCE | 
| 133 |  |  |  |  |  |  |  | 
| 134 |  |  |  |  |  |  | This software is copyright (c) 2020 by Karen Etheridge. | 
| 135 |  |  |  |  |  |  |  | 
| 136 |  |  |  |  |  |  | This is free software; you can redistribute it and/or modify it under | 
| 137 |  |  |  |  |  |  | the same terms as the Perl 5 programming language system itself. | 
| 138 |  |  |  |  |  |  |  | 
| 139 |  |  |  |  |  |  | =cut |