From ad6f26f3b9f0e428020d05667987556f8fcbec2f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 24 Nov 2019 00:22:34 +0000 Subject: tests: use File::Temp->newdir instead of tempdir() We'll also introduce a tmpdir() API to give tempdirs consistent names. --- t/httpd.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 't/httpd.t') diff --git a/t/httpd.t b/t/httpd.t index ce8063b2..f0b4efb4 100644 --- a/t/httpd.t +++ b/t/httpd.t @@ -8,12 +8,11 @@ foreach my $mod (qw(Plack::Util Plack::Builder HTTP::Date HTTP::Status)) { eval "require $mod"; plan skip_all => "$mod missing for httpd.t" if $@; } -use File::Temp qw/tempdir/; use Socket qw(IPPROTO_TCP SOL_SOCKET); require './t/common.perl'; # FIXME: too much setup -my $tmpdir = tempdir('pi-httpd-XXXXXX', TMPDIR => 1, CLEANUP => 1); +my ($tmpdir, $for_destroy) = tmpdir(); my $home = "$tmpdir/pi-home"; my $err = "$tmpdir/stderr.log"; my $out = "$tmpdir/stdout.log"; -- cgit v1.2.3-24-ge0c7