This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
#17449 failed to apply the actual patch. This is it.
[perl5.git] / lib / Exporter / Heavy.pm
index 3bdc4b4..5e05803 100644 (file)
@@ -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) {