On Sat, Jul 25, 2009 at 06:23:45PM -0700, Paul Fenwick wrote: > Ah, the 2.06_01 was pushed to the CPAN from OSCON to make sure my slides > worked on my Friday talk. I marked it as a dev release because I hadn't put > any work into design or testing of eval_error(), so I best do that now. > > Some modules (eg, Text::Balanced) may set $@ on failure, but not actually > throw an exception. If one tries to apply autodie (with hints) to one of > these modules, the actual error message itself becomes impossible to access. > By the time autodie is formatting error messages, the old $@ is gone, > because autodie has thrown its own exception. > > To accommodate these modules, I added eval_error() to the autodie::exception > class. It contains the contents of $@ at the time autodie threw its own > exception, which means that we can use autodie with modules like > Text::Balanced and still get good looking and informative errors. > > The only thing I really want to check is: > > * Is ->eval_error() a sensible method name for this. I picked it > as the English name for $@ is $EVAL_ERROR. > > I also need to write tests. I'm exhausted at the moment, so I'd cheerfully > accept patches, but otherwise they'll probably get written somewhere on my > trip to YAPC::EU.
I'll happily pull it from blead and maint if you prefer! I originally merged it because it incorporated all the point fixes cluttering blead and maint, and didn't change any existing stuff (ie just added a new method). -- But Pity stayed his hand. "It's a pity I've run out of bullets", he thought. -- "Bored of the Rings"