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

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

Thread Previous | Thread Next
From:
renee.baecker
Date:
August 20, 2008 04:26
Subject:
Re: [perl #30524] [PATCH] CGI.pm has poor list of temp directories on Windows
Message ID:
20080820112558.5F2F1120002@rserv16.sitepush.net
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.

Cheers,
Renee




Thread Previous | Thread Next


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