DavidFerrington has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm using Log4Perl (v1.04) and Config::General (v2.31) and I'd like to redirect any croaks from Config::General to my appender, rather than have them appear on stderr. But I don't know how to do that.
-- David
  • Comment on Send Config::General errors to Log4Perl

Replies are listed 'Best First'.
Re: Send Config::General errors to Log4Perl
by molecules (Monk) on Jan 28, 2010 at 16:46 UTC
      Thank you, I had forgotten I could do that.
      -- David
        In fact it was simpler - just call the new method of Config::General in an eval block and then check $@ !

        but this got me looking at __DIE__ and I have a use for that. I can trap the message etc. but other than doing an exit from my routine, I can't find a way of stopping Perl printing the die message.

        is that possible or is exit the right way ?

        -- David