C++: class is a keyword
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_Unix.pm
index 1b4822b..d5f93a5 100644 (file)
@@ -18,8 +18,7 @@ use vars qw($VERSION @ISA
 
 use ExtUtils::MakeMaker qw($Verbose neatvalue);
 
-# $VERSION needs to stay numeric to avoid test warnings
-$VERSION = '1.5002';
+$VERSION = '1.51';
 
 require ExtUtils::MM_Any;
 @ISA = qw(ExtUtils::MM_Any);
@@ -1305,17 +1304,16 @@ sub init_MANPODS {
 
     # Set up names of manual pages to generate from pods
     foreach my $man (qw(MAN1 MAN3)) {
-       $self->{"BUILD${man}PODS"} = 1;
-
-       unless ($self->{"${man}PODS"}) {
-           $self->{"${man}PODS"} = {};
-           $self->{"BUILD${man}PODS"} = 0 if
-              $self->{"INSTALL${man}DIR"} =~ /^(none|\s*)$/;
+       if ( $self->{"${man}PODS"}
+             or $self->{"INSTALL${man}DIR"} =~ /^(none|\s*)$/
+        ) {
+            $self->{"${man}PODS"} ||= {};
+        }
+        else {
+            my $init_method = "init_${man}PODS";
+            $self->$init_method();
        }
     }
-
-    $self->init_MAN1PODS() if $self->{BUILDMAN1PODS};
-    $self->init_MAN3PODS() if $self->{BUILDMAN3PODS};
 }
 
 
@@ -1418,8 +1416,6 @@ Initializes PMLIBDIRS and PM from PMLIBDIRS.
 sub init_PM {
     my $self = shift;
 
-    my $pm = $self->{PM};
-
     # Some larger extensions often wish to install a number of *.pm/pl
     # files into the library in various locations.
 
@@ -1471,6 +1467,8 @@ sub init_PM {
        @{$self->{PMLIBPARENTDIRS}} = ('lib');
     }
 
+    return if $self->{PM} and $self->{ARGS}{PM};
+
     if (@{$self->{PMLIBDIRS}}){
        print "Searching PMLIBDIRS: @{$self->{PMLIBDIRS}}\n"
            if ($Verbose >= 2);
@@ -1500,7 +1498,7 @@ sub init_PM {
            $inst = $self->libscan($inst);
            print "libscan($path) => '$inst'\n" if ($Verbose >= 2);
            return unless $inst;
-           $pm->{$path} = $inst;
+           $self->{PM}{$path} = $inst;
        }, @{$self->{PMLIBDIRS}});
     }
 }
@@ -2979,7 +2977,14 @@ PPD_OUT
 
     }
 
-    $ppd_xml .= sprintf <<'PPD_OUT', $Config{archname};
+    my $archname = $Config{archname};
+    if ($] >= 5.008) {
+        # archname did not change from 5.6 to 5.8, but those versions may
+        # not be not binary compatible so now we append the part of the
+        # version that changes when binary compatibility may change
+        $archname .= "-". substr($Config{version},0,3);
+    }
+    $ppd_xml .= sprintf <<'PPD_OUT', $archname;
         <OS NAME="$(OSNAME)" />
         <ARCHITECTURE NAME="%s" />
 PPD_OUT