Do away with memory models cruft. Sorry, PDP users.
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / Install.pm
index 47bde0d..36c7221 100644 (file)
@@ -1,12 +1,13 @@
 package ExtUtils::Install;
 
+use 5.005_64;
+our(@ISA, @EXPORT, $VERSION);
 $VERSION = substr q$Revision: 1.28 $, 10;
 # $Date: 1998/01/25 07:08:24 $
 
 use Exporter;
 use Carp ();
 use Config qw(%Config);
-use vars qw(@ISA @EXPORT $VERSION);
 @ISA = ('Exporter');
 @EXPORT = ('install','uninstall','pm_to_blib', 'install_default');
 $Is_VMS = $^O eq 'VMS';
@@ -15,7 +16,7 @@ my $splitchar = $^O eq 'VMS' ? '|' : ($^O eq 'os2' || $^O eq 'dos') ? ';' : ':';
 my @PERL_ENV_LIB = split $splitchar, defined $ENV{'PERL5LIB'} ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || '';
 my $Inc_uninstall_warn_handler;
 
-#use vars qw( @EXPORT @ISA $Is_VMS );
+#our(@EXPORT, @ISA, $Is_VMS);
 #use strict;
 
 sub forceunlink {
@@ -67,7 +68,6 @@ sub install {
     }
     $packlist->read($pack{"read"}) if (-f $pack{"read"});
     my $cwd = cwd();
-    my $umask = umask 0 unless $Is_VMS;
 
     my($source);
     MOD_INSTALL: foreach $source (sort keys %hash) {
@@ -140,7 +140,6 @@ sub install {
        print "Writing $pack{'write'}\n";
        $packlist->write($pack{'write'});
     }
-    umask $umask unless $Is_VMS;
 }
 
 sub directory_not_empty ($) {
@@ -193,7 +192,6 @@ sub uninstall {
        forceunlink($_) unless $nonono;
     }
     print "unlink $fil\n" if $verbose;
-    close P;
     forceunlink($fil) unless $nonono;
 }
 
@@ -226,7 +224,7 @@ sub inc_uninstall {
        if ($nonono) {
            if ($verbose) {
                $Inc_uninstall_warn_handler ||= new ExtUtils::Install::Warn;
-               $libdir =~ s|^\./|| ; # That's just cosmetics, no need to port. It looks prettier.
+               $libdir =~ s|^\./||s ; # That's just cosmetics, no need to port. It looks prettier.
                $Inc_uninstall_warn_handler->add("$libdir/$file",$targetfile);
            }
            # if not verbose, we just say nothing
@@ -259,7 +257,6 @@ sub pm_to_blib {
       close(FROMTO);
      }
 
-    my $umask = umask 0022 unless $Is_VMS;
     mkpath($autodir,0,0755);
     foreach (keys %$fromto) {
        next if -f $fromto->{$_} && -M $fromto->{$_} < -M $_;
@@ -277,10 +274,9 @@ sub pm_to_blib {
        utime($atime,$mtime+$Is_VMS,$fromto->{$_});
        chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$fromto->{$_});
        print "cp $_ $fromto->{$_}\n";
-       next unless /\.pm$/;
+       next unless /\.pm\z/;
        autosplit($fromto->{$_},$autodir);
     }
-    umask $umask unless $Is_VMS;
 }
 
 package ExtUtils::Install::Warn;
@@ -343,7 +339,7 @@ There are two keys with a special meaning in the hash: "read" and
 target files to the file named by C<$hashref-E<gt>{write}>. If there is
 another file named by C<$hashref-E<gt>{read}>, the contents of this file will
 be merged into the written file. The read and the written file may be
-identical, but on AFS it is quite likely, people are installing to a
+identical, but on AFS it is quite likely that people are installing to a
 different directory than the one where the files later appear.
 
 install_default() takes one or less arguments.  If no arguments are 
@@ -356,7 +352,7 @@ The argument-less form is convenient for install scripts like
 
   perl -MExtUtils::Install -e install_default Tk/Canvas
 
-Assuming this command is executed in a directory with populated F<blib> 
+Assuming this command is executed in a directory with a populated F<blib> 
 directory, it will proceed as if the F<blib> was build by MakeMaker on 
 this machine.  This is useful for binary distributions.