Jonathan Vanasco <[EMAIL PROTECTED]> writes:
> i'm standardizing my some functions to release into cpan and am at a bit of a
> loss on catching apreq errors.
Here's what I was alluding to on apreq-dev when you asked about it:
my $body = eval { $req->body };
if ($@) {
if ($@ == APR::Request::Error::OVERLIMIT) {
... $@ is an APR::Request::Error object
which can be stringified or numified ...
}
elsif ($@ == ...) {
...
}
}
The reason for that approach is that $req->body won't die
on "trivial" errors (as determined by the C function
apreq_module_status_is_error()), so you only need to check
for non-trivial ones. Does this not work for you?
--
Joe Schaefer