I have not tested this or anything on 5.8.7, I am in the process of
moving my changes over to 5.8.7.

When the CRTL is in UNIX REPORT mode, the file specification for $^X is returned as UNIX, and can not be passed as a parameter to MCR.

In most cases, the fix is simply to remove the VMS specific code that adds the MCR to the command line, as if an obviously UNIX specification is passed as $^X will always be when it is not an obvious VMS specification, Perl will automatically convert it to a VMS specification and add the MCR command.

Of course I did not realize that until after I implemented VMS specific hack to VMSIFY($^X) on many of the routines.

-John
[EMAIL PROTECTED]
Personal Opinion Only

--- t/old_lib_warnings_doio._5_8_6      Thu May 19 12:52:34 2005
+++ t/lib/warnings/doio.        Thu May 19 12:41:07 2005
@@ -60,10 +60,10 @@
 __END__
 # doio.c [Perl_do_open9]
 use warnings 'io' ;
-open(F, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|");
+open(F, '|'."$^X -e 1|");
 close(F);
 no warnings 'io' ;
-open(G, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|");
+open(G, '|'."$^X -e 1|");
 close(G);
 EXPECT
 Can't open bidirectional pipe at - line 3.
--- lib/Test/Harness/Straps.pm_5_8_7    Thu Jul 14 13:20:01 2005
+++ lib/Test/Harness/Straps.pm  Thu Jul 14 13:32:03 2005
@@ -356,7 +356,11 @@
     my $self = shift;
 
     return $ENV{HARNESS_PERL}           if defined $ENV{HARNESS_PERL};
-    return "MCR $^X"                    if $self->{_is_vms};
+    if ($self->{_is_vms}) {
+       # VMS can pretend it is UNIX, but MCR needs VMS specifications.
+       my $perl = VMS::Filespec::vmsify($^X);
+       return "MCR $perl";
+    }
     return Win32::GetShortPathName($^X) if $self->{_is_win32};
     return $^X;
 }
--- t/op/anonsub.t_5_8_6        Mon May 16 17:27:21 2005
+++ t/op/anonsub.t      Tue Jun 14 18:50:20 2005
@@ -32,7 +32,7 @@
     print TEST "$prog\n";
     close TEST or die "Could not close: $!";
     my $results = $Is_VMS ?
-               `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
+               `$^X "-I[-.lib]" $switch $tmpfile 2>&1` :
                  $Is_MSWin32 ?
                    `.\\perl -I../lib $switch $tmpfile 2>&1` :
                      $Is_MacOS ?  
--- t/op/closure.t_5_8_6        Mon May 16 18:35:27 2005
+++ t/op/closure.t      Mon May 16 18:35:38 2005
@@ -23,6 +23,10 @@
   $test++;
 }
 
+#VMS can pretend that it is UNIX.
+my $perl = $^X;
+$perl = VMS::Filespec::vmsify($perl) if $^O eq 'VMS';
+
 my $i = 1;
 sub foo { $i = shift if @_; $i }
 
@@ -466,7 +470,7 @@
            my $errfile = "terr$$";  $errfile++ while -e $errfile;
            my @tmpfiles = ($cmdfile, $errfile);
            open CMD, ">$cmdfile"; print CMD $code; close CMD;
-           my $cmd = (($^O eq 'VMS') ? "MCR $^X"
+           my $cmd = (($^O eq 'VMS') ? "MCR $perl"
                       : ($^O eq 'MSWin32') ? '.\perl'
                       : ($^O eq 'MacOS') ? $^X
                       : ($^O eq 'NetWare') ? 'perl'
--- t/op/runlevel.t_5_8_6       Tue May 17 11:20:04 2005
+++ t/op/runlevel.t     Tue May 17 11:20:15 2005
@@ -14,6 +14,10 @@
 $Is_MacOS = $^O eq 'MacOS';
 $ENV{PERL5LIB} = "../lib" unless $Is_VMS;
 
+#VMS can pretend that it is UNIX.
+my $perl = $^X;
+$perl = VMS::Filespec::vmsify($perl) if $^O eq 'VMS';
+
 $|=1;
 
 undef $/;
@@ -34,7 +38,7 @@
     print TEST "$prog\n";
     close TEST or die "Could not close: $!";
     my $results = $Is_VMS ?
-                      `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
+                      `MCR $perl "-I[-.lib]" $switch $tmpfile 2>&1` :
                  $Is_MSWin32 ?  
                      `.\\perl -I../lib $switch $tmpfile 2>&1` :
                  $Is_NetWare ?  

Reply via email to