In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Michael G Schwern) wrote:
> There's a lot of redundant code in MakeMaker because there's no common idiom
> for "cd into this directory and run this command".
The idea is to turn 'foo' into '[.foo]' not 'foo[.foo]' so you need
something like the following:
--- lib/ExtUtils/MM_VMS.pm;-0 Thu Dec 16 21:42:19 2004
+++ lib/ExtUtils/MM_VMS.pm Thu Dec 16 22:41:53 2004
@@ -2111,7 +2111,7 @@ sub cd {
my($self, $dir, @cmds) = @_;
# Translate a Unix directory to a relative VMS dir.
- $dir .= "[.$dir]" unless /^\[.*\]$/;
+ $dir = "[.$dir]" unless $dir =~ m/^\[.*\]$/;
my $cmd = join "\n\t", map "$_", @cmds;
[end of patch]
That should work as long as there is no punctuation, but it might turn
'./foo' into the illegal '[../foo]'.
It might be better to simply say
$dir = VMS::Filespec::vmspath($dir);
I'll give that a try tomorrow. On VMS, VMS::Filespec is always already
loaded, even in miniperl, so it's kosher to use it here.
And while we're here, distdir is broken. $(MAKE) has no meaning on
VMS; what you want is $(MMS)$(MMSQUALIFIERS). There are various
examples in MM_VMS.pm.