Look for cpanm in sitebin too

internal-support
Alessandro Ranellucci 2013-06-23 11:10:11 +02:00
parent 8320985c2d
commit ff7daadb76
1 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,8 @@ my %recommends = qw(
my $cpanm;
if (defined $ENV{CPANM} && -x $ENV{CPANM}) {
$cpanm = $ENV{CPANM};
} elsif (-x (my $c = File::Spec->catfile($Config{sitebin}, 'cpanm'))) {
$cpanm = $c;
} elsif (-x (my $c = File::Spec->catfile($Config{installscript}, 'cpanm'))) {
$cpanm = $c;
} elsif ($^O =~ /^(?:darwin|linux)$/ && system(qw(which cpanm)) == 0) {