On Thu, Jan 26, 2006 at 09:39:20AM -0600, [EMAIL PROTECTED] wrote: > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > > > Is this related to the way perl normally handles $@ , > > something I missed in > > the Inline::Java docs or an Inline::Java bug? > > It's something that can happen in any perl code. In general you > shouldn't depend on $@ to remain constant after any function call. Ah, > the pleasures of global variables. =)
True. But 'function calls' can happen in odd places. I've just fixed a bug in DBD::Proxy where $@ was being lost in disconnect. The person reporting the bug didn't call disconnect, it was being called by DESTROY. The DESTROY method can be called at surprising times. I think it's good practice to localize $@ wherever eval is used 'behind the scenes'. Tim.