in reply to Re^2: Rethrowing with die $@ considered harmful
in thread Rethrowing with die $@ considered harmful

Generally recommended usage? I can easily find where ysth points out that the recommended usage is the first example. I can even find where, in perlcall, G_KEEPERR is mentioned to work around this issue from XS code (I think - I don't completely grok the internals). Where is it "generally recommended" to use the latter method? And would the rest of us notice it against the backdrop of perlcompile, perlembed (x2), perlform, and perlop giving examples such as the former?

  • Comment on Re^3: Rethrowing with die $@ considered harmful

Replies are listed 'Best First'.
Re^4: Rethrowing with die $@ considered harmful
by diotalevi (Canon) on Jul 18, 2006 at 14:30 UTC

    I didn't look in the docs. I recall this most clearly from when I was looking at Exception::Class. Hmm. It became abundantly clear *then* that you always, always, always copy $@. Perhaps it isn't in our docs.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊