Skip Menu |
 

This queue is for tickets about the PathTools CPAN distribution.

Report information
The Basics
Id: 74349
Status: open
Priority: 0/
Queue: PathTools

People
Owner: Nobody in particular
Requestors: jkeenan [...] cpan.org
TJC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.33
Fixed in: (no value)



Subject: TMPDIR is being cached for the life of the module
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 180
Download (untitled) / with headers
text/plain 180b
File::Spec::UNIX will cache $ENV{TMPDIR} internally after the first call to File::Spec->tmpdir; Unfortunately this breaks any code that tries to adjust the environment variable.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-14882-1327473352-1729.74349-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 127
Download (untitled) / with headers
text/plain 127b
Or rather -- it confuses any code which changes $ENV{TMPDIR} and expects that to be honoured by File::Temp's TMPDIR=>1 option.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-14882-1327473352-1729.74349-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.8.HEAD-14882-1327473352-1729.74349-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-23663-1385271464-466.74349-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 768
Download (untitled) / with headers
text/plain 768b
On Wed Jan 25 01:35:52 2012, TJC wrote: Show quoted text
> Or rather -- it confuses any code which changes $ENV{TMPDIR} and expects > that to be honoured by File::Temp's TMPDIR=>1 option.
The documentation of tmpdir() currently found in dist/Cwd/lib/File/Spec/Unix.pm (Perl 5 core distribution) states: ##### Returns a string representation of the first writable directory from the following list or the current directory if none from the list are writable: $ENV{TMPDIR} /tmp ##### I interpret this to mean, "At the point I call tmpdir(), see what's available first on that list and use it as a temporary directory." The "confusion" is being created by the author of the code which changes the environmental variable -- not by File::Spec. Thank you very much. Jim Keenan


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.