summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>1999-03-17 20:04:31 -0400
committerGurusamy Sarathy <gsar@cpan.org>1999-03-24 10:30:51 +0000
commit918c0b2d7bc71242c4810571f6971cac26c1327c (patch)
treec244a3d5d86c2cf948ab297e79353a815e62dcf6
parentfa08c05b640ede69b33d2ae5b23634d6e5b0865c (diff)
downloadperl-918c0b2d7bc71242c4810571f6971cac26c1327c.tar.gz
applied suggested patch, modulo superseded parts
Message-id: <01J8YF0EOWLU001E7S@mail.newman.upenn.edu> Subject: [PATCH 5.005_56] Miscellaneous small fixes p4raw-id: //depot/perl@3152
-rw-r--r--ext/B/defsubs.h.PL4
-rw-r--r--ext/re/re.pm2
-rw-r--r--lib/ExtUtils/MM_Unix.pm6
-rw-r--r--lib/File/Basename.pm12
4 files changed, 21 insertions, 3 deletions
diff --git a/ext/B/defsubs.h.PL b/ext/B/defsubs.h.PL
index e485ac3300..c24eb94170 100644
--- a/ext/B/defsubs.h.PL
+++ b/ext/B/defsubs.h.PL
@@ -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 ))
diff --git a/ext/re/re.pm b/ext/re/re.pm
index 09f52d6086..842e39ad75 100644
--- a/ext/re/re.pm
+++ b/ext/re/re.pm
@@ -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,
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index 38bb061e66..8d09668ff8 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -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)$/){
diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm
index 69bb1fa5fd..191eff970a 100644
--- a/lib/File/Basename.pm
+++ b/lib/File/Basename.pm
@@ -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);