in reply to Is there a more elegant existing solution than @CARP_NOT
As well as the solutions mentioned, I've just realized it's probably as easy as defining import in Foo::Bar::Error to be something like:
{ my %SEEN; our @CARP_NOT; sub import { my $caller = caller; return if $SEEN{$caller}; __PACKAGE__->export_to_level(1, @_); push @CARP_NOT, $caller; } }
That seems to work (passes all my tests anyway!) - if not, I've now got some useful alternatives.
Again, thanks for the advice.
|
|---|