in reply to Re^2: Log4perl swallowing $@
in thread Log4perl swallowing $@

Oh I don't know about that. Actually, I think you *are* thinking about it properly. Although it makes sense that external code will refer to certain variables, it is natural to expect that said code won't walk all over those variables without restoring them or at least telling you about it in some way. File that report, in my opinion.

Replies are listed 'Best First'.
Re^4: Log4perl swallowing $@
by Anonymous Monk on Oct 29, 2010 at 06:49 UTC
    There is no bug, the expectations are wrong

    The variable $@ is never touched in Log4perl

    However log4perl does use eval

    Its just like $!, its only valid immediately after a system call, if you want to use it at few lines later, you have to cache it.

      Agree with this one. Nobody shall assume that $@ or $! or $? would keep their values for ever. It would be tedious job trying to properly localize all of the variables that your code may indirectly affect.