Skip to content

Commit

Permalink
use scratch disk if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ranguard committed Apr 27, 2016
1 parent 549d2d3 commit c34ae31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/MetaCPAN/Model/Archive.pm
Expand Up @@ -77,7 +77,11 @@ has _tempdir => (
init_arg => undef,
lazy => 1,
default => sub {
return File::Temp->newdir;

my $scratch_disk = '/mnt/scratch_disk';
return -d $scratch_disk
? File::Temp->newdir('/mnt/scratch_disk/tempXXXXX')
: File::Temp->newdir;
},
);

Expand Down

0 comments on commit c34ae31

Please sign in to comment.