Finalize change #4232.
[p5sagit/p5-mst-13.2.git] / lib / File / Basename.pm
index 69bb1fa..d1c8666 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';> always 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);