Integrate podlators-1.25
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_Unix.pm
index cb516a5..c5bb19e 100644 (file)
@@ -19,7 +19,7 @@ use vars qw($VERSION @ISA
 
 use ExtUtils::MakeMaker qw($Verbose neatvalue);
 
-$VERSION = '1.32';
+$VERSION = '1.33';
 
 require ExtUtils::MM_Any;
 @ISA = qw(ExtUtils::MM_Any);
@@ -1349,8 +1349,15 @@ sub init_dirscan {       # --- File and Directory Lists (.xs .pm .pod etc)
     # (which includes PARENT_NAME). This is a subtle distinction but one
     # that's important for nested modules.
 
-    $self->{PMLIBDIRS} = ['lib', $self->{BASEEXT}]
+    if ($Is_VMS) {
+      # avoid logical name collisions by adding directory syntax
+      $self->{PMLIBDIRS} = ['./lib', './' . $self->{BASEEXT}]
        unless $self->{PMLIBDIRS};
+    }
+    else {
+      $self->{PMLIBDIRS} = ['lib', $self->{BASEEXT}]
+       unless $self->{PMLIBDIRS};
+    }
 
     #only existing directories that aren't in $dir are allowed
 
@@ -1419,7 +1426,7 @@ sub init_dirscan {        # --- File and Directory Lists (.xs .pm .pod etc)
                my($ispod)=0;
                if (open(FH,"<$name")) {
                    while (<FH>) {
-                       if (/^=head1\s+\w+/) {
+                       if (/^=\w/) {
                            $ispod=1;
                            last;
                        }
@@ -1448,7 +1455,7 @@ sub init_dirscan {        # --- File and Directory Lists (.xs .pm .pod etc)
                my($ispod)=0;
                if (open(FH,"<$name")) {
                    while (<FH>) {
-                       if (/^=head1\s+\w+/) {
+                       if (/^=\w/) {
                            $ispod=1;
                            last;
                        }
@@ -1719,10 +1726,13 @@ usually solves this kind of problem.
     }
 
     # strip blanks
-    if ($self->{VERSION}) {
+    if (defined $self->{VERSION}) {
        $self->{VERSION} =~ s/^\s+//;
        $self->{VERSION} =~ s/\s+$//;
     }
+    else {
+        $self->{VERSION} = '';
+    }
     ($self->{VERSION_SYM} = $self->{VERSION}) =~ s/\W/_/g;
 
     $self->{DISTVNAME} = "$self->{DISTNAME}-$self->{VERSION}";
@@ -2741,7 +2751,7 @@ q[-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "],
  $self->{MAKEFILE}, q[";' \\
 -e 'print "Manifying $$m{$$_}\n";' \\
 -e 'system(q[$(PERLRUN) $(POD2MAN_EXE) ].qq[$$_>$$m{$$_}])==0 or warn "Couldn\\047t install $$m{$$_}\n";' \\
--e 'chmod(oct($(PERM_RW))), $$m{$$_} or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}'
+-e 'chmod(oct($(PERM_RW)), $$m{$$_}) or warn "chmod $(PERM_RW) $$m{$$_}: $$!\n";}'
 ];
     push @m, "\nmanifypods : pure_all ";
     push @m, join " \\\n\t", keys %{$self->{MAN1PODS}}, keys %{$self->{MAN3PODS}};