diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-09-12 08:12:59 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-09-12 08:12:59 +0100 |
commit | 0105f2b1236b169342446129a0de2fd073540afd (patch) | |
tree | e11b470f040bfee015f332d76dcb8688aec4e06e /lib | |
parent | a049506658d2a1f1262d7635971158f305c441f6 (diff) | |
download | perl-0105f2b1236b169342446129a0de2fd073540afd.tar.gz |
Untangle File::Basename and re - avoid hard-coding the hints value.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Basename.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index b3fe0ac6e5..d842844daf 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -37,13 +37,13 @@ is equivalent to the original path for all systems but VMS. package File::Basename; -# 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. +# not be available, but we only actually need it if running under tainting. BEGIN { - unless (eval { require re; }) - { eval ' sub re::import { $^H |= 0x00100000; } ' } # HINT_RE_TAINT - import re 'taint'; + if (${^TAINT}) { + require re; + re->import('taint'); + } } @@ -54,7 +54,7 @@ our(@ISA, @EXPORT, $VERSION, $Fileparse_fstype, $Fileparse_igncase); require Exporter; @ISA = qw(Exporter); @EXPORT = qw(fileparse fileparse_set_fstype basename dirname); -$VERSION = "2.77"; +$VERSION = "2.78"; fileparse_set_fstype($^O); |