This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
applied suggested patch, modulo superseded parts
authorCharles Bailey <bailey@newman.upenn.edu>
Thu, 18 Mar 1999 00:04:31 +0000 (20:04 -0400)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 24 Mar 1999 10:30:51 +0000 (10:30 +0000)
Message-id: <01J8YF0EOWLU001E7S@mail.newman.upenn.edu>
Subject: [PATCH 5.005_56] Miscellaneous small fixes

p4raw-id: //depot/perl@3152

ext/B/defsubs.h.PL
ext/re/re.pm
lib/ExtUtils/MM_Unix.pm
lib/File/Basename.pm

index e485ac3..c24eb94 100644 (file)
@@ -1,7 +1,11 @@
+# Do not remove the following line; MakeMaker relies on it to identify
+# this file as a template for defsubs.h
+# Extracting defsubs.h (with variable substitutions)
 #!perl
 my ($out) = __FILE__ =~ /(^.*)[._]PL/i;
 if ($^O eq 'VMS') { $out =~ s/(^.*)[._](.*$)/$1.$2/;}
 open(OUT,">$out") || die "Cannot open $file:$!";
+print "Extracting $out . . .\n";
 foreach my $const (qw(AVf_REAL 
                      HEf_SVKEY
                       SVf_IOK SVf_NOK SVf_POK SVf_ROK SVp_IOK SVp_POK ))
index 09f52d6..842e39a 100644 (file)
@@ -74,6 +74,8 @@ See L<perlmodlib/Pragmatic Modules>.
 
 =cut
 
+# N.B. File::Basename contains a literal for 'taint' as a fallback.  If
+# taint is changed here, File::Basename must be updated as well.
 my %bitmask = (
 taint  => 0x00100000,
 eval   => 0x00200000,
index 38bb061..8d09668 100644 (file)
@@ -1320,10 +1320,12 @@ sub init_dirscan {      # --- File and Directory Lists (.xs .pm .pod etc)
            $h{$name} = 1;
        } elsif ($name =~ /\.PL$/) {
            ($pl_files{$name} = $name) =~ s/\.PL$// ;
-       } elsif ($Is_VMS && $name =~ /\.pl$/) {  # case-insensitive filesystem
+       } elsif ($Is_VMS && $name =~ /[._]pl$/i) {
+           # case-insensitive filesystem, one dot per name, so foo.h.PL
+           # under Unix appears as foo.h_pl under VMS
            local($/); open(PL,$name); my $txt = <PL>; close PL;
            if ($txt =~ /Extracting \S+ \(with variable substitutions/) {
-               ($pl_files{$name} = $name) =~ s/\.pl$// ;
+               ($pl_files{$name} = $name) =~ s/[._]pl$//i ;
            }
            else { $pm{$name} = $self->catfile('$(INST_LIBDIR)',$name); }
        } elsif ($name =~ /\.(p[ml]|pod)$/){
index 69bb1fa..191eff9 100644 (file)
@@ -124,7 +124,17 @@ directory name to be F<.>).
 
 
 ## use strict;
-use re 'taint';
+# A bit of juggling to insure that C<use re 'taint';> awlays works, since
+# File::Basename is used during the Perl build, when the re extension may
+# not be available.
+BEGIN {
+  unless (eval { require re; })
+    { eval ' sub re::import { $^H |= 0x00100000; } ' }
+  import re 'taint';
+}
+
+
+
 
 require Exporter;
 @ISA = qw(Exporter);