More changes to Build.PL
This commit is contained in:
parent
2d3fb15a3f
commit
ecf4099611
26
Build.PL
26
Build.PL
@ -27,19 +27,29 @@ my %recommends = qw(
|
||||
Class::XSAccessor 0
|
||||
Growl::GNTP 0.15
|
||||
XML::SAX::ExpatXS 0
|
||||
Wx 0.9901
|
||||
);
|
||||
|
||||
# removed:
|
||||
# Wx 0.9901
|
||||
|
||||
my @try = (
|
||||
$ENV{CPANM} // (),
|
||||
File::Spec->catfile($Config{sitebin}, 'cpanm'),
|
||||
File::Spec->catfile($Config{installscript}, 'cpanm'),
|
||||
);
|
||||
|
||||
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) {
|
||||
foreach my $path (@try) {
|
||||
if (-e $path) { # don't use -x because it fails on Windows
|
||||
$cpanm = $path;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if (!$cpanm) {
|
||||
if ($^O =~ /^(?:darwin|linux)$/ && system(qw(which cpanm)) == 0) {
|
||||
$cpanm = 'cpanm';
|
||||
}
|
||||
}
|
||||
die <<'EOF'
|
||||
cpanm was not found. Please install it before running this script.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user