Skip to content

Commit be85546

Browse files
committed
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
1 parent de895f0 commit be85546

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lib/DBIx/Class/Admin.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ BEGIN {
77
unless DBIx::Class::Optional::Dependencies->req_ok_for ('admin');
88
}
99

10+
use JSON::Any qw(DWIW PP JSON CPANEL XS);
1011
use Moose;
1112
use MooseX::Types::Moose qw/Int Str Any Bool/;
1213
use DBIx::Class::Admin::Types qw/DBICConnectInfo DBICHashRef/;
1314
use MooseX::Types::JSON qw(JSON);
1415
use MooseX::Types::Path::Class qw(Dir File);
1516
use MooseX::Types::LoadableClass qw(LoadableClass);
1617
use Try::Tiny;
17-
use JSON::Any qw(DWIW XS JSON);
1818
use namespace::autoclean;
1919

2020
=head1 NAME

lib/DBIx/Class/Optional/Dependencies.pm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use Carp ();
1212
# Makefile.PL in $AUTHOR mode
1313

1414
my $json_any = {
15-
'JSON::Any' => '1.22',
15+
'JSON::Any' => '1.23',
1616
};
1717

1818
my $moose_basic = {
@@ -196,7 +196,10 @@ my $reqs = {
196196
test_admin_script => {
197197
req => {
198198
%$admin_script,
199+
'JSON::Any' => '1.30',
199200
'JSON' => 0,
201+
'JSON::PP' => 0,
202+
'Cpanel::JSON::XS' => 0,
200203
'JSON::XS' => 0,
201204
$^O eq 'MSWin32'
202205
# for t/admin/10script.t

t/admin/10script.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $ENV{PATH} = '';
2222
$ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
2323

2424
require JSON::Any;
25-
my @json_backends = qw/XS JSON DWIW/;
25+
my @json_backends = qw(DWIW PP JSON CPANEL XS);
2626

2727
# test the script is setting @INC properly
2828
test_exec (qw|-It/lib/testinclude --schema=DBICTestAdminInc --connect=[] --insert|);

0 commit comments

Comments
 (0)