G'day Dave / All,

Warning: After a week of OSCON, and a large sleep debt, I'm practically out
of mana.  I apologise for any lack of clarity that may result.

Dave Mitchell wrote:

> Paul, I just pulled in autodie 2.06_01 from CPAN into blead and maint.
> AFAIKT, 2.06_01 is a sync of blead plus the addition of the eval_error
> method, so I'm assuming this is good for 5.10.1.

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.

Cheerio,

        Paul


-- 
Paul Fenwick <p...@perltraining.com.au> | http://perltraining.com.au/
Director of Training                   | Ph:  +61 3 9354 6001
Perl Training Australia                | Fax: +61 3 9354 2681

Reply via email to