Skip to content

Commit

Permalink
Test more JSON::Any backends, and reorder the selection in terms of d…
Browse files Browse the repository at this point in the history
…esirability

DWIW is the most lax JSON parser and thus is always preferred for CLI work
  • Loading branch information
ribasushi committed Oct 31, 2013
1 parent de895f0 commit be85546
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/DBIx/Class/Admin.pm
Expand Up @@ -7,14 +7,14 @@ 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/;
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
Expand Down
5 changes: 4 additions & 1 deletion lib/DBIx/Class/Optional/Dependencies.pm
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion t/admin/10script.t
Expand Up @@ -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|);
Expand Down

0 comments on commit be85546

Please sign in to comment.