in reply to Exporter. Correct way to override import?
with:my $this = shift ; $this->SUPER::import( @_ ) ;
By default, Export::import() adds symbols to its caller's namespace, so it's been adding them to Foo:: rather than main::.Foo->export_to_level(1, @_);
You have to explicitly tell Exporter to export more than 1 level up.
See the section in Exporter's docs, 'Exporting Without Using Exporter's import Method'
Dave.
|
|---|