Re: File::Temp/File::Spec problems on Windows under taint mode – breaking change needed?

[email protected] (David Golden)
Newsgroups perl.cpan.workers
Message-ID <CAOeq1c9NFqgiGDs1Uk1Ssys4jn7DAKZZCLM9YsYG=4rB8xg34g@mail.gmail.com>
On Mon, Apr 27, 2015 at 4:10 PM, Jens Rehsack <[email protected]> wrote:

> Is there a reason not to tryout Win32 API function GetTempPath (
> https://msdn.microsoft.com/en-us/library/windows/desktop/aa364992%28v=vs.85%29.aspx
> )?
> I dunno how File::Spec/File::Temp on Unix behaves tmp points to a
> non-writable directory (think r/o file-system).
>

Good point.  I think that's feasible if Win32::API is installed, which most
Win32 Perl's should have, IIRC.  As a further fallback, I think all Win32
Perl's ship with Win32.pm, which gives Win32::GetFolderPath.  Then
CSIDL_INTERNET_CACHE
looks like the best choice for temporary data.

David


-- 
David Golden <[email protected]> Twitter/IRC: @xdg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.