Subject: | Update Base.pm in Module-Build to handle an executable extension |
This bug report arises from my efforts to qualify Perl 5.14.2 against Stratus OpenVOS Release 17.1 and 17.2.
The ACTION_installdeps routine in Base.pm (Version 0.4003) has code to verify that the file that it is about to execute is actually executable. This requires it to know how to convert a command name into a file name. The Stratus VOS / OpenVOS operating system, like Windows, requires that executable files end in the ".pm" suffix (yes, you read that correctly). The attached patch updates this routine to see if an executable suffix is available, and if so, to try using it first. If this fails, it goes ahead and tests without it. I coded it this way for maximum compatibility, but I think it could just as easily have been coded as an if-then-else. I'll leave that decision to you.
I have tested this change on OpenVOS Releases 17.1 and 17.2 and it produces the desired behavior. If you have any questions or concerns about this proposeod change, please let me know. Thanks!
Subject: | module_build.vos.exe.diff |
diff --git a/cpan/Module-Build/lib/Module/Build/Base.pm b/cpan/Module-Build/lib/Module/Build/Base.pm
index cf42cc0..3b50597 100644
--- a/cpan/Module-Build/lib/Module/Build/Base.pm
+++ b/cpan/Module-Build/lib/Module/Build/Base.pm
@@ -3685,6 +3685,14 @@ sub ACTION_installdeps {
}
}
+ my $exe = Module::Build::Config->get('exe_ext');
+
+ if (defined $exe) {
+ if ( ! -x "$command$exe" ) {
+ die "cpan_client '$command$exe' is not executable\n";
+ }
+ }
+
if ( ! -x $command ) {
die "cpan_client '$command' is not executable\n";
}