From: Peter Rabbitson Date: Thu, 31 Oct 2013 10:28:49 +0000 (+0100) Subject: Test more JSON::Any backends, and reorder the selection in terms of desirability X-Git-Tag: v0.08260~99 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be855469022c8f011585451803d1db23b0e07728;p=dbsrgits%2FDBIx-Class.git Test more JSON::Any backends, and reorder the selection in terms of desirability DWIW is the most lax JSON parser and thus is always preferred for CLI work --- diff --git a/lib/DBIx/Class/Admin.pm b/lib/DBIx/Class/Admin.pm index 0eb6e0c..b30aa0a 100644 --- a/lib/DBIx/Class/Admin.pm +++ b/lib/DBIx/Class/Admin.pm @@ -7,6 +7,7 @@ BEGIN { unless DBIx::Class::Optional::Dependencies->req_ok_for ('admin'); } +use JSON::Any qw(DWIW PP JSON CPANEL XS); use Moose; use MooseX::Types::Moose qw/Int Str Any Bool/; use DBIx::Class::Admin::Types qw/DBICConnectInfo DBICHashRef/; @@ -14,7 +15,6 @@ use MooseX::Types::JSON qw(JSON); use MooseX::Types::Path::Class qw(Dir File); use MooseX::Types::LoadableClass qw(LoadableClass); use Try::Tiny; -use JSON::Any qw(DWIW XS JSON); use namespace::autoclean; =head1 NAME diff --git a/lib/DBIx/Class/Optional/Dependencies.pm b/lib/DBIx/Class/Optional/Dependencies.pm index 7b44658..e312c72 100644 --- a/lib/DBIx/Class/Optional/Dependencies.pm +++ b/lib/DBIx/Class/Optional/Dependencies.pm @@ -12,7 +12,7 @@ use Carp (); # Makefile.PL in $AUTHOR mode my $json_any = { - 'JSON::Any' => '1.22', + 'JSON::Any' => '1.23', }; my $moose_basic = { @@ -196,7 +196,10 @@ my $reqs = { test_admin_script => { req => { %$admin_script, + 'JSON::Any' => '1.30', 'JSON' => 0, + 'JSON::PP' => 0, + 'Cpanel::JSON::XS' => 0, 'JSON::XS' => 0, $^O eq 'MSWin32' # for t/admin/10script.t diff --git a/t/admin/10script.t b/t/admin/10script.t index 2a26659..9414b84 100644 --- a/t/admin/10script.t +++ b/t/admin/10script.t @@ -22,7 +22,7 @@ $ENV{PATH} = ''; $ENV{PERL5LIB} = join ($Config{path_sep}, @INC); require JSON::Any; -my @json_backends = qw/XS JSON DWIW/; +my @json_backends = qw(DWIW PP JSON CPANEL XS); # test the script is setting @INC properly test_exec (qw|-It/lib/testinclude --schema=DBICTestAdminInc --connect=[] --insert|);