summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-08-29 22:56:45 +0000
committerhv <hv@crypt.org>2002-08-29 22:56:45 +0000
commita6faae8dfc92869b2dd029b3fff2c8eea57135d0 (patch)
tree13ac04ac30557c3d7cd117cbda095eb704136076 /lib
parentd4e900e09d841ca8d48fcd75d5be63ec52dc96d1 (diff)
downloadperl-a6faae8dfc92869b2dd029b3fff2c8eea57135d0.tar.gz
#17449 failed to apply the actual patch. This is it.
p4raw-id: //depot/perl@17806
Diffstat (limited to 'lib')
-rw-r--r--lib/Exporter.pm7
-rw-r--r--lib/Exporter/Heavy.pm4
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/Exporter.pm b/lib/Exporter.pm
index 8b8d4c4939..753ea6aab2 100644
--- a/lib/Exporter.pm
+++ b/lib/Exporter.pm
@@ -9,7 +9,8 @@ require 5.006;
our $Debug = 0;
our $ExportLevel = 0;
our $Verbose ||= 0;
-our $VERSION = '5.566';
+our $VERSION = '5.567';
+our (%Cache);
$Carp::Internal{Exporter} = 1;
sub as_heavy {
@@ -30,10 +31,10 @@ sub import {
my $callpkg = caller($ExportLevel);
# We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-(
- my($exports, $export_cache, $fail)
- = (\@{"$pkg\::EXPORT"}, \%{"$pkg\::EXPORT"}, \@{"$pkg\::EXPORT_FAIL"});
+ my($exports, $fail) = (\@{"$pkg\::EXPORT"}, \@{"$pkg\::EXPORT_FAIL"});
return export $pkg, $callpkg, @_
if $Verbose or $Debug or @$fail > 1;
+ my $export_cache = ($Cache{$pkg} ||= {});
my $args = @_ or @_ = @$exports;
local $_;
diff --git a/lib/Exporter/Heavy.pm b/lib/Exporter/Heavy.pm
index 3bdc4b4f20..5e05803604 100644
--- a/lib/Exporter/Heavy.pm
+++ b/lib/Exporter/Heavy.pm
@@ -51,7 +51,7 @@ sub heavy_export {
my($pkg, $callpkg, @imports) = @_;
my($type, $sym, $oops);
my($exports, $export_cache) = (\@{"${pkg}::EXPORT"},
- \%{"${pkg}::EXPORT"});
+ $Exporter::Cache{$pkg} ||= {});
if (@imports) {
if (!%$export_cache) {
@@ -144,7 +144,7 @@ sub heavy_export {
}
my($fail, $fail_cache) = (\@{"${pkg}::EXPORT_FAIL"},
- \%{"${pkg}::EXPORT_FAIL"});
+ $Exporter::FailCache{$pkg} ||= {});
if (@$fail) {
if (!%$fail_cache) {