Skip to content

Commit

Permalink
Work around JSON::Any not being future-proof
Browse files Browse the repository at this point in the history
  • Loading branch information
ribasushi committed Oct 31, 2013
1 parent bcb37ec commit de895f0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions t/admin/10script.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ BEGIN {
delete $ENV{JSON_ANY_ORDER};
}

use JSON::Any;

$ENV{PATH} = '';
$ENV{PERL5LIB} = join ($Config{path_sep}, @INC);

require JSON::Any;
my @json_backends = qw/XS JSON DWIW/;

# test the script is setting @INC properly
Expand All @@ -42,9 +41,9 @@ cmp_ok ($? >> 8, '==', 71, 'Correct schema loaded via testconfig');

for my $js (@json_backends) {

eval {JSON::Any->import ($js) };
SKIP: {
skip ("JSON backend $js is not available, skip testing", 1) if $@;
eval {JSON::Any->import ($js); 1 }
or skip ("JSON backend $js is not available, skip testing", 1);

local $ENV{JSON_ANY_ORDER} = $js;
eval { test_dbicadmin () };
Expand Down

0 comments on commit de895f0

Please sign in to comment.