develooper Front page | perl.cpan.workers | Postings from May 2015

RFC: Fixing fallback tempdir location on Win32

Thread Next
David Golden
May 21, 2015 15:39
RFC: Fixing fallback tempdir location on Win32
Message ID:
We have various unsolved tickets (see end for links) about
File::Temp/File::Spec failing on Windows due to taint, where
File::Spec->tmpdir returns the root directory, which many Windows users
can't actually write to.  (Context: File::Spec checks -w on candidate temp
dirs, but that can be true on Windows, yet the ACLs can prevent files from
being written there. See perlport on -X operators.)

After discussions on #toolchain, I have two proposals:

(1)  That File::Temp fall back to the following if it can't create a
temporary directory in the directory that is the result of


(2) That File::Spec::Win32 put that same path after environment variables
paths but before all existing fallback paths (

Doing #1 will allow users to upgrade File::Temp and fix the problem on
older perls without needing to upgrade PathTools.  Doing #2 will fix both
and can go into perl v5.23 and be released to CPAN after the corresponding
v5.23 release.



File::Temp tickets
* (two tickets merged)

PathTools tickets

David Golden <> Twitter/IRC: @xdg

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About