develooper Front page | perl.perl5.porters | Postings from August 2008

Re: [perl #30524] [PATCH] CGI.pm has poor list of temp directorieson Windows

From:
H.Merijn Brand
Date:
August 20, 2008 05:28
Subject:
Re: [perl #30524] [PATCH] CGI.pm has poor list of temp directorieson Windows
Message ID:
20080820142804.184be30e@pc09.procura.nl
On Wed, 20 Aug 2008 13:25:58 +0200 (CEST),
renee.baecker@smart-websolutions.de wrote:

> Am 20.08.2008 um 12:54 Uhr haben Sie geschrieben:
> >
> > I don't know CGI/Windows enough to tell if those folders should exist,
> > but wouldn't it be safer to check that? Somewhat like
> >
> > $CGI::OS eq "WINDOWS" and
> >     unshift @TEMP, grep { -d }
> > 	(map { exists $ENV{$_} ? ($ENV{$_}) : () }
> > 	    qw( TEMP TMP )),
> > 	 $ENV{WINDIR}.$SL."TEMP");
> >
> 
> No, this is not necessary. A few lines later in CGI.pm:
> 
>     foreach (@TEMP) {
>       do {$TMPDIRECTORY = $_; last} if -d $_ && -w _;
>     }
> 
> There are already entries in @TEMP that unlikely exist.

OK, and $ENV{TEMP} and $ENV{TMP} *always* exist in Win-land?

-- 
H.Merijn Brand          Amsterdam Perl Mongers  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About