Skip to content

Commit

Permalink
Merge pull request #465 from CPAN-API/leo/use_scratch
Browse files Browse the repository at this point in the history
use scratch disk if it exists
  • Loading branch information
oalders committed Apr 28, 2016
2 parents 549d2d3 + c34ae31 commit 463a18d
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 463a18d

Please sign in to comment.