http://www.perlmonks.org?node_id=324961


in reply to Re: How to lose Carp levels with @CARP_NOT?
in thread How to lose Carp levels with @CARP_NOT?

The more robust solution is the new internal style. Just stick the line: $Carp::Internal{$_}++ for 'Log::Dispatch::Output', 'Log::Dispatch'; in your module. And now those two packages will be ignored whenever Carp crawls back, looking for where to start reporting the error from.

How will you know whether a Carp.pm supports this? Check if the %Carp::Internal hash exists already? Or is there some version number check that I can use?

Liz