X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fadmin%2F10script.t;h=9414b84623d3e1fe2d4292c3fdc944c805f2939a;hb=c1ce337f0f1c6a35d33edbeeb10fecce76812008;hp=9f4ab901a450ac1331229631333dc07e580f9d2c;hpb=16120b2279b09ec32c1c7801400809137fb0e843;p=dbsrgits%2FDBIx-Class.git diff --git a/t/admin/10script.t b/t/admin/10script.t index 9f4ab90..9414b84 100644 --- a/t/admin/10script.t +++ b/t/admin/10script.t @@ -18,12 +18,11 @@ BEGIN { delete $ENV{JSON_ANY_ORDER}; } -use JSON::Any; - $ENV{PATH} = ''; $ENV{PERL5LIB} = join ($Config{path_sep}, @INC); -my @json_backends = qw/XS JSON DWIW/; +require JSON::Any; +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|); @@ -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 () };