X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExporter.pm;h=753ea6aab271185a2bde18adb55d10ba2174d05b;hb=fbeb8e69a2839da21922b2334a124af719d18406;hp=8b8d4c49392bedc9c959ec99c0b3ad2ebb5d8138;hpb=cec46e5aa4a3941270ece36999adfbf3f58eb538;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Exporter.pm b/lib/Exporter.pm index 8b8d4c4..753ea6a 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 $_;