X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FModule-Metadata.git;a=blobdiff_plain;f=t%2Ftaint.t;fp=t%2Ftaint.t;h=80ae7ea12b462e13379c3ac63003ebc518bdec16;hp=ef527de50d147b692b36157185bd365f7156f489;hb=698048aae1e0dc6b392843feab394f8eb0d28fa5;hpb=88b6f9f89b2d7dc2d64624eb0fb8e9803f053cc2 diff --git a/t/taint.t b/t/taint.t old mode 100644 new mode 100755 index ef527de..80ae7ea --- a/t/taint.t +++ b/t/taint.t @@ -2,7 +2,6 @@ use strict; use warnings; -use 5.008000; # for ${^TAINT} use Test::More tests => 2; use Module::Metadata; use Carp 'croak'; @@ -17,7 +16,8 @@ sub exception(&) { return $@; } -ok(${^TAINT}, 'taint flag is set'); +my $taint_on = ! eval { no warnings; join('',values %ENV), kill 0; 1; }; +ok($taint_on, 'taint flag is set'); # without the fix, we get: # Insecure dependency in eval while running with -T switch at lib/Module/Metadata.pm line 668, line 15.