about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-12-28 06:26:05 +0000
committerEric Wong <e@80x24.org>2018-12-29 03:46:12 +0000
commit1f2ddc7f2bae4a89dd91e1e371b88aab7e7f7ed4 (patch)
tree9f18e5536b9bfaba6c6e47637bb9318186b3cc9c /t
parent59c946a014f34cd90621b1fb3b30af99ba80bf61 (diff)
downloadpublic-inbox-1f2ddc7f2bae4a89dd91e1e371b88aab7e7f7ed4.tar.gz
No need to write our own loop when an assignment will do.
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 {