On Tuesday, December 21, 2010 23:47:42 Mark Hedges wrote: > Seems to be some squirliness in this doc. Is this more clear? --mark-- > To me the original version looks clearer. It says quite clearly "if I can handle the exception do so else propagate".
However, the sigil before "ref" is certainly a typo. Also, I prefer "and" instead of "&&" in such cases. But that's just me. Further, ... > --- /usr/lib/perl5/APR/Error.pm.orig 2010-12-21 14:42:28.000000000 -0800 > +++ /usr/lib/perl5/APR/Error.pm 2010-12-21 14:45:11.000000000 -0800 > @@ -109,13 +109,16 @@ > =head1 Synopsis > > eval { $obj->mp_method() }; > - if ($@ && $ref $@ eq 'APR::Error' && $@ == $some_code) { > - # handle the exception > + if (my $err = $@) { > + if (ref $err eq 'APR::Error') { > + if ($err == $apr_const_code) { > + # handle exceptions for APR::Const codes... > + } what happens in the else branch here? > + } > + else { > + die $err; > + } > } > - else { > - die $@; # rethrow it > - } > - > > =head1 Description Torsten Förtsch -- Need professional modperl support? Hire me! (http://foertsch.name) Like fantasy? http://kabatinte.net