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
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.
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.
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.