Skip to content

Commit

Permalink
Use $*TMPDIR to create temporary files
Browse files Browse the repository at this point in the history
$*TMPDIR will follow the operating system's best practices for
temporary file management
  • Loading branch information
hoelzro committed Jul 21, 2015
1 parent 76d6ae3 commit 7448bf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/p6doc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sub findbin() returns Str {
constant INDEX = findbin() ~ 'index.data';

sub tempfile() {
my $tempfile = %*ENV<TEMP> // %*ENV<TMP> // '/tmp';
my $tempfile = $*TMPDIR.Str;
$tempfile ~= '/';
$tempfile ~= join '', ('a'..'z', 0..9).roll(5);
$tempfile ~= '.tmp';
Expand Down

0 comments on commit 7448bf7

Please sign in to comment.