From: Diab Jerius Date: Mon, 8 Jul 2002 18:44:12 +0000 (-0400) Subject: (retracted by #17444) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4afb7519d86e52b18cb15a8ff307f1cc0cfb8e0f;p=p5sagit%2Fp5-mst-13.2.git (retracted by #17444) Subject: [ID 20020708.003] File::Spec::Unix::tmpdir automagically creates $ENV{TMPDIR} Message-Id: <200207082244.g68MiDY22791@pelf.harvard.edu> p4raw-id: //depot/perl@17428 --- diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index 87ee505..c6ca111 100644 --- a/lib/File/Spec/Unix.pm +++ b/lib/File/Spec/Unix.pm @@ -141,8 +141,10 @@ is tainted, it is not used. my $tmpdir; sub tmpdir { return $tmpdir if defined $tmpdir; - my @dirlist = ($ENV{TMPDIR}, "/tmp"); + my @dirlist = ( "/tmp" ); + if ( exists $ENV{TMPDIR} ) { + unshift @dirlist, $ENV{TMPDIR}; no strict 'refs'; if (${"\cTAINT"}) { # Check for taint mode on perl >= 5.8.0 require Scalar::Util;