Localise %ENV to fix test bug
Tomas Doran [Tue, 9 Feb 2010 03:26:35 +0000 (03:26 +0000)]
Changes
t/05env.t

diff --git a/Changes b/Changes
index d7d84d3..1a451a2 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 This file documents the revision history for Perl extension HTTP::Request::AsCGI.
 
+    - Fixed RT#46653 by localising %ENV in the test so that it can't be
+      broken from outside.
     - Fixed tests on perl <= 5.6.2 by skipping if Encode is not installed.
       (RT#52456)
 
index 1ab9ab7..0c31b5c 100644 (file)
--- a/t/05env.t
+++ b/t/05env.t
@@ -16,6 +16,7 @@ use Encode;
 
 plan tests => 11;
 
+local %ENV;
 $ENV{__PRESERVE_ENV_TEST} = 1;
 
 my $r = HTTP::Request->new( GET => 'http://www.host.com/cgi-bin/script.cgi/my%20path%2F?a=1&b=2', [ 'X-Test' => 'Test' ] );