robmueller / cache-fastmmap

Uses an mmap'ed file to act as a shared memory interprocess cache
http://search.cpan.org/~robm/Cache-FastMmap/
18 stars 15 forks source link

Use the canonical tmpdir for the default share_file #4

Closed Hugmeir closed 7 years ago

Hugmeir commented 10 years ago

Rather than relaying on the environment or some hardcoded defaults, using File::Spec->tmpdir will always give you a working temp dir; this is important for systems that either don't have a standard tempdir (VMS) or simply don't have a tempdir (android, blackberry 10).

..truth be told though, this patch was written just for Android. But on the flip side, share_file will now actually use the correct tempdir on Windows.

robmueller commented 10 years ago

Hi. Thanks, looks reasonable. I'll pull and release a new version when I have a bit of time.