| 1 | use strict; | ||
| 2 | use warnings; | ||
| 3 | package JSON::Schema::Draft201909; # git description: v0.130-3-g7e1449a | ||
| 4 | # vim: set ts=8 sts=2 sw=2 tw=100 et : | ||
| 5 | # ABSTRACT: (DEPRECATED) Validate data against a schema | ||
| 6 | # KEYWORDS: JSON Schema data validation structure specification | ||
| 7 | |||
| 8 | our $VERSION = '0.131'; | ||
| 9 | |||
| 10 | use 5.016; # for fc, unicode_strings features | ||
| 11 | no if "$]" >= 5.031009, feature => 'indirect'; | ||
| 12 | no if "$]" >= 5.033001, feature => 'multidimensional'; | ||
| 13 | no if "$]" >= 5.033006, feature => 'bareword_filehandles'; | ||
| 14 | use strictures 2; | ||
| 15 | use Moo; | ||
| 16 | use namespace::clean; | ||
| 17 | |||
| 18 | extends 'JSON::Schema::Modern'; | ||
| 19 | |||
| 20 | my $warned; | ||
| 21 | |||
| 22 | around BUILDARGS => sub { | ||
| 23 | my ($orig, $class, @args) = @_; | ||
| 24 | |||
| 25 | Carp::carp 'JSON::Schema::Draft201909 is deprecated; use JSON::Schema::Modern' if not $warned++; | ||
| 26 | |||
| 27 | return $class->$orig( | ||
| 28 | @args == 1 && ref $args[0] eq 'HASH' ? %{$args[0]} : @args, | ||
| 29 | specification_version => 'draft2019-09', | ||
| 30 | ); | ||
| 31 | }; | ||
| 32 | |||
| 33 | 1; | ||
| 34 | |||
| 35 | __END__ |