Skip to content

Commit

Permalink
Respect env MINICPAN first, then try home, etc
Browse files Browse the repository at this point in the history
also explicitly check /home/metacpan since that's most likely
  • Loading branch information
rwstauner committed May 21, 2014
1 parent 0b42d2b commit 21cebaf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/MetaCPAN/Role/Common.pm
Expand Up @@ -139,8 +139,10 @@ sub file2mod {

sub _build_cpan {
my $self = shift;
my @dirs
= ( "$ENV{'HOME'}/CPAN", "$ENV{'HOME'}/minicpan", $ENV{'MINICPAN'} );
my @dirs = (
$ENV{MINICPAN}, '/home/metacpan/CPAN',
"$ENV{HOME}/CPAN", "$ENV{HOME}/minicpan"
);
foreach my $dir ( grep {defined} @dirs ) {
return $dir if -d $dir;
}
Expand Down

0 comments on commit 21cebaf

Please sign in to comment.