about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/cgi.t3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/cgi.t b/t/cgi.t
index 2e2476d7..d92749b3 100644
--- a/t/cgi.t
+++ b/t/cgi.t
@@ -217,8 +217,7 @@ done_testing();
 
 sub run_with_env {
         my ($env, @args) = @_;
-        my $init = sub { foreach my $k (keys %$env) { $ENV{$k} = $env->{$k} } };
-        IPC::Run::run(@args, init => $init);
+        IPC::Run::run(@args, init => sub { %ENV = (%ENV, %$env) });
 }
 
 sub cgi_run {