Exporter will load Exporter::Heavy if it sees *any* sigils in the @EXPORT list. This includes &foo. "&foo" is equivalent to "foo" and can be processed the same. This patch simply strips off any leading & before Exporter does its thing.
-- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Ahh email, my old friend. Do you know that revenge is a dish that is best served cold? And it is very cold on the Internet!
--- lib/Exporter.pm 2005/06/28 22:37:17 1.1 +++ lib/Exporter.pm 2005/06/28 23:03:50 @@ -9,7 +9,7 @@ our $Debug = 0; our $ExportLevel = 0; our $Verbose ||= 0; -our $VERSION = '5.59'; +our $VERSION = '5.60'; our (%Cache); # Carp does this now for us, so we can finally live w/o Carp #$Carp::Internal{Exporter} = 1; @@ -43,6 +43,9 @@ my $export_cache = ($Cache{$pkg} ||= {}); my $args = @_ or @_ = @$exports; + my @args = @_; + s/^&// foreach @args; + local $_; if ($args and not %$export_cache) { s/^&//, $export_cache->{$_} = 1 @@ -54,16 +57,16 @@ if ($args or $fail) { ($heavy = (/\W/ or $args and not exists $export_cache->{$_} or @$fail and $_ eq $fail->[0])) and last - foreach (@_); + foreach (@args); } else { ($heavy = /\W/) and last - foreach (@_); + foreach (@args); } - return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy; + return export $pkg, $callpkg, ($args ? @args : ()) if $heavy; local $SIG{__WARN__} = sub {require Carp; &Carp::carp}; # shortcut for the common case of no type character - *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_; + *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @args; } # Default methods