Re: glob() on VMS totally different than Unix.

[email protected] (John Malmberg)
Newsgroups perl.perl5.porters,perl.vmsperl
Message-ID <[email protected]>
Craig A. Berry wrote:
> 
> Failed 8/28 test programs. 36/985 subtests failed.
> 
> So that's clearly a step in the wrong direction.  I'm working on  
> alternatives.

This patch (along with the other patches previously submitted) makes the 
lib/Module/Build/t/Compat.t pass all tests.

I have not yet checked to see if it causes an issue with other tests 
that use Module Build.

-John
[email protected]
Personal Opinion Only
m_b_base_pm2.gdiff (text/plain, 1.5 KB)
--- /rsync_root/perl/lib/Module/Build/Base.pm	Wed Jan 14 11:50:10 2009
+++ lib/Module/Build/Base.pm	Thu Jan 22 22:00:49 2009
@@ -13,6 +13,7 @@
 use File::Copy ();
 use File::Find ();
 use File::Path ();
+use File::Glob ();
 use File::Basename ();
 use File::Spec 0.82 ();
 use File::Compare ();
@@ -2817,7 +2818,9 @@
     my ($name, $path) = File::Basename::fileparse($pods->{$pod},
                                                  file_qr('\.(?:pm|plx?|pod)$'));
     my @dirs = File::Spec->splitdir( File::Spec->canonpath( $path ) );
-    pop( @dirs ) if $dirs[-1] eq File::Spec->curdir;
+    if (@dirs) {
+        pop( @dirs ) if $dirs[-1] eq File::Spec->curdir;
+    }
 
     my $fulldir = File::Spec->catfile($htmldir, @rootdirs, @dirs);
     my $outfile = File::Spec->catfile($fulldir, "${name}.html");
@@ -2968,7 +2971,7 @@
 
 sub ACTION_clean {
   my ($self) = @_;
-  foreach my $item (map glob($_), $self->cleanup) {
+  foreach my $item (map File::Glob::glob($_), $self->cleanup) {
     $self->delete_filetree($item);
   }
 }
@@ -4061,7 +4064,7 @@
       # Need to remove volume from $map{$_} using splitpath, or else
       # we'll create something crazy like C:\Foo\Bar\E:\Baz\Quux
       # VMS will always have the file separate than the path.
-      my ($volume, $path, $file) = File::Spec->splitpath( $map{$_}, 1 );
+      my ($volume, $path, $file) = File::Spec->splitpath( $map{$_}, 0 );
 
       # catdir needs a list of directories, or it will create something
       # crazy like volume:[Foo.Bar.volume.Baz.Quux]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.