in reply to Re: Re (tilly) 1: Overriding Exporter::import
in thread Overriding Exporter::import

When you localize something and then goto, it first has to clean up your scope before removing it from the callstack and so the local is lost.

The documented approach if you are not calling Exporter's import directly is to call export_to_level. It is buggy in at least some versions of Perl with some exports. (I think it is fine if you are just exporting functions, but if you trigger Export::Heavy...) No, I don't remember exact details, but I do have a recollection floating around that it had to do with the rewrite for Exporter/Heavy.pm. You will have to analyze the source code for yourself if you want to know more.

  • Comment on Re (tilly) 3: Overriding Exporter::import