Acme::CPANModules::PERLANCAR::Task::GettingTempDir - Getting system-wide temporary directory in a portable way
This document describes version 0.002 of Acme::CPANModules::PERLANCAR::Task::GettingTempDir (from Perl distribution Acme-CPANModulesBundle-PERLANCAR), released on 2018-06-11.
Getting system-wide temporary directory in a portable way.
There's the good ol' File::Spec which has a tmpdir function. On Unix it looks at TMPDIR environment variable before falling back to /tmp. File::Temp uses this for its tempdir when a template is not specified.
tmpdir
TMPDIR
/tmp
tempdir
Then there's File::Util::Tempdir which tries a little harder. On Unix, its get_tempdir will look at TMPDIR, then also TEMPDIR, TMP, TEMP. If none of those are set, it will return the first existing directory from the list: /tmp, /var/tmp. If everything fails, will die.
get_tempdir
TEMPDIR
TMP
TEMP
/var/tmp
File::Spec
File::Util::Tempdir
Please visit the project's homepage at https://metacpan.org/release/Acme-CPANModulesBundle-PERLANCAR.
Source repository is at https://github.com/perlancar/perl-Acme-CPANModulesBundle-PERLANCAR.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Acme-CPANModulesBundle-PERLANCAR
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Acme::CPANModules - about the Acme::CPANModules namespace
cpanmodules - CLI tool to let you browse/view the lists
perlancar <perlancar@cpan.org>
This software is copyright (c) 2018 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Acme::CPANModulesBundle::PERLANCAR, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::CPANModulesBundle::PERLANCAR
CPAN shell
perl -MCPAN -e shell install Acme::CPANModulesBundle::PERLANCAR
For more information on module installation, please visit the detailed CPAN module installation guide.