Subject: | cpan_client cannot be found on some systems |
When I run "./Build installdeps" the cpan_client cannot be found on my
Arch Linux system, because perl is located at /usr/bin/perl while cpan
is under /usr/bin/perlbin/core/cpan. Module::Build gives the
(inaccurate) error message:
cpan_client 'cpan' is not executable
In fact it was not found at all.
The attached patch solves this by adding the config parameters
installscript, installsitescript, installvendorscript
to the array of dirs to look into. (Actually the "patch" was generated
from a bundled Module::Build in a git repo, but it is so trivial that I
did not bother).
One more thing: I think the lookup order of the dirs should change from
install{bin,script}, installsite{bin,script}, installvendor{bin,script}
to:
installsite{bin,script}, installvendor{bin,script}, install{bin,script}
since this follows the order of precedence in Perl's @INC (site > vendor
Show quoted text
> core).
Thanks!
Subject: | Module-Base.diff |
diff --git a/inc/Module-Build/lib/perl5/Module/Build/Base.pm b/inc/Module-Build/lib/perl5/Module/Build/Base.pm
index 5bd8ec7..c8ca32d 100644
--- a/inc/Module-Build/lib/perl5/Module/Build/Base.pm
+++ b/inc/Module-Build/lib/perl5/Module/Build/Base.pm
@@ -3392,6 +3392,7 @@ sub ACTION_installdeps {
if ( ! File::Spec->file_name_is_absolute( $command ) ) {
my @bindirs = File::Basename::dirname($self->perl);
push @bindirs, map {$self->config->{"install${_}bin"}} '','site','vendor';
+ push @bindirs, map {$self->config->{"install${_}script"}} '','site','vendor';
for my $d ( @bindirs ) {
my $abs_cmd = $self->find_command(File::Spec->catfile( $d, $command ));
if ( defined $abs_cmd ) {