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.

These changes should be at most harmless until the rest of the VMS Perl
catches up with them, or at worse, Perl really does not function well if
you put the CRTL in the UNIX modes now.


lib/extutils/t/command.t

When the VMS CRTL is in UNIX mode, Perl needs to use '?' for a wild
card.

lib/extutils/t/constant.t

VMS may return files in exact case.

When the VMS CRTL is in UNIX mode, it noticed that the ".OLD" file does not exist on the rename and died. As no rename was needed on VMS in either mode, special cased out the code for VMS.

lib/extutils/t/embed.t

When the VMS CRTL is in UNIX mode, the include and lib lists are presented to Perl in UNIX syntax, and need to be vmsify() for the compares to work.

lib/extutils/t/inst.t

In this case when the VMS CRTL is in UNIX mode, the current directory and updir will be returned as "." and "..", and that will not match what the test expects, so these must get vmsify().

lib/extutils/t/inst_prefix.t
lib/extutils/t/recurs.t

More cases where makemaker is needs VMS syntax when the CRTL is in a UNIX mode.

Not as bad as my previous changes. All the new threads I have time to start tonight. Tomorrow, hopefully I will merge my vms.c and vmsish.c with the 5.8.7 versions of it and try a build.

[EMAIL PROTECTED]
Personal Opinion Only
--- lib/ExtUtils/t/Command.t_5_8_6      Tue May  3 15:30:57 2005
+++ lib/ExtUtils/t/Command.t    Tue May  3 15:31:38 2005
@@ -178,7 +178,30 @@
         chdir 'ecmddir';
 
         # % means 'match one character' on VMS.  Everything else is ?
-        my $match_char = $^O eq 'VMS' ? '%' : '?';
+        my $match_char = '?';
+
+       # VMS on Perl can now pretend it is like everyone else.
+       if ($^O eq 'VMS') {
+         my $unix_report;
+         my $unix_only;
+
+         $unix_report = $ENV{'DECC$FILENAME_UNIX_REPORT'};
+         if (defined $unix_report) {
+           if (($unix_report lt '1') && ($unix_report ne 'ENABLE')) {
+             $unix_report = undef;
+           }
+         }
+         $unix_only = $ENV{'DECC$FILENAME_UNIX_ONLY'};
+         if (defined $unix_only) {
+           if (($unix_only lt '1') && ($unix_only ne 'ENABLE')) {
+             $unix_only = undef;
+           }
+         }
+         $unix_report = 1 if (defined $unix_only);
+
+         $match_char = '%' if !(defined $unix_report);
+       }
+
         ($ARGV[0] = $file) =~ s/.\z/$match_char/;
 
         # this should find the file
--- lib/ExtUtils/t/Embed.t_5_8_6        Tue May  3 16:07:17 2005
+++ lib/ExtUtils/t/Embed.t      Tue May  3 16:08:35 2005
@@ -34,8 +34,10 @@
 
 if ($^O eq 'VMS') {
     push(@cmd,$cc,"/Obj=$obj");
+    $inc = VMS::Filespec::vmspath($inc);
     my (@incs) = ($inc);
     my $crazy = ccopts();
+    $lib = VMS::Filespec::vmspath($lib);
     if ($crazy =~ s#/inc[^=/]*=([\w\$\_\-\.\[\]\:]+)##i) {
         push(@incs,$1);
     }
--- lib/ExtUtils/t/INST_PREFIX.t_5_8_6  Tue May 10 15:30:35 2005
+++ lib/ExtUtils/t/INST_PREFIX.t        Tue May 10 15:46:32 2005
@@ -95,6 +95,10 @@
 if( $ENV{PERL_CORE} ) {
     $perl_src = File::Spec->catdir($Updir, $Updir);
     $perl_src = File::Spec->canonpath($perl_src);
+
+#   VMS can be pretending to be UNIX, but Makemaker can not
+#   currently deal with that.
+    $perl_src = VMS::Filespec::vmspath($perl_src) if $^O eq 'VMS';
     $mm_perl_src = File::Spec->canonpath($mm->{PERL_SRC});
 }
 else {
@@ -139,6 +143,11 @@
     $ExtUtils::MM_Unix::Config{installman3dir} = '';
 
     my $wibble = File::Spec->catdir(qw(wibble and such));
+
+#   VMS can be pretending to be UNIX, but Makemaker can not
+#   currently deal with that.
+    $wibble = VMS::Filespec::vmspath($wibble) if $^O eq 'VMS';
+
     my $stdout = tie *STDOUT, 'TieOut' or die;
     my $mm = WriteMakefile(
                            NAME          => 'Big::Dummy',
@@ -181,8 +190,16 @@
                    INSTALLMAN3DIR=> 'foo/bar/baz',
                   );
 
+    if ($^O eq 'VMS') {
+#     VMS can be pretending to be UNIX, but Makemaker can not
+#     currently deal with that.
+      is( $mm->{INSTALLVENDORMAN1DIR}, 
VMS::Filespec::vmspath(File::Spec->catdir('foo','bar')),
+                      'installvendorman1dir (in %Config) not modified' );
+    }
+    else {
     is( $mm->{INSTALLVENDORMAN1DIR}, File::Spec->catdir('foo','bar'), 
                       'installvendorman1dir (in %Config) not modified' );
+    }
     isnt( $mm->{INSTALLVENDORMAN3DIR}, '', 
                       'installvendorman3dir (not in %Config) set'  );
 }
--- lib/ExtUtils/t/INST.t_5_8_6 Tue May 10 15:56:18 2005
+++ lib/ExtUtils/t/INST.t       Tue May 10 15:57:17 2005
@@ -33,6 +33,13 @@
 my $Curdir = File::Spec->curdir;
 my $Updir  = File::Spec->updir;
 
+if ($^O eq 'VMS') {
+#     VMS can be pretending to be UNIX, but Makemaker can not
+#     currently deal with that.
+  $Curdir = VMS::Filespec::vmspath($Curdir);
+  $Updir = VMS::Filespec::vmspath($Updir);
+}
+
 ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
   diag("chdir failed: $!");
 
--- lib/ExtUtils/t/recurs.t_5_8_6       Tue May 24 18:02:13 2005
+++ lib/ExtUtils/t/recurs.t     Tue May 24 18:02:20 2005
@@ -105,6 +105,10 @@
 ok( -e $submakefile, 'sub Makefile written' );
 
 my $inst_script = File::Spec->catdir(File::Spec->updir, 'cgi');
+
+#Makemaker does not yet understand VMS pretending to be UNIX.
+$inst_script = VMS::Filespec::vmspath($inst_script) if $Is_VMS;
+
 ok( open(MAKEFILE, $submakefile) ) || diag("Can't open $submakefile: $!");
 { local $/;  
   like( <MAKEFILE>, qr/^\s*INST_SCRIPT\s*=\s*\Q$inst_script\E/m, 
--- lib/ExtUtils/t/Constant.t_5_8_7     Thu Jul 14 18:26:16 2005
+++ lib/ExtUtils/t/Constant.t   Thu Jul 14 18:47:36 2005
@@ -87,6 +87,7 @@
   opendir DIR, $dir or die "opendir '$dir': $!";
   while (defined (my $entry = readdir DIR)) {
     $entry =~ s/\.$// if $^O eq 'VMS';  # delete trailing dot that indicates 
no extension
+    $entry = lc($entry) if $^O eq 'VMS'; # VMS can be case preserved/sensitive.
     next if $expect{$entry};
     print "# Extra file '$entry'\n";
     $fail = 1;
@@ -250,8 +251,18 @@
 
   check_for_bonus_files ('.', @$files, $output, $makefile_rename, '.', '..');
 
+  # On VMS makemaker does not create a .OLD file.  In the default mode
+  # because by VMS file parsing rules, the file already has the resulting
+  # VMS name so nothing happens.
+  # When VMS is in UNIX emulation mode, this fails.  So this hack makes it
+  # work.  But if makemaker is updated to produce UNIX like makefiles on
+  # VMS where the .OLD file will exist, then this will need to be changed
+  # again.
+
+  if ($^O ne 'VMS') {
   rename $makefile_rename, $makefile
     or die "Can't rename '$makefile_rename' to '$makefile': $!";
+  }
 
   unlink $output or warn "Can't unlink '$output': $!";
 

Reply via email to