Joe Schaefer wrote:
Stas Bekman <[EMAIL PROTECTED]> writes:


Stas Bekman wrote:

It makes the socket read/write loops similar to filter ones:
   while ($socket->recv(my $buff, BUFF_LEN)) {
       $socket->send($buff);
   }

Sounds like a great idea, Stas!


+1. It'd be cool if Apache::(Request|Cookie) also took advantage of APR::Error.

It should be trivial to do. just replace Perl_croak calls with modperl_croak(aTHX_ rc, "function name"); and require mod_perl 1.99_14 as a minimal version. that's ofcourse for those places where you have an rc (which must be apr_status_t).


I'm also going to add a wrapper to replace the crafty

 if (ref $@ eq 'Apache::Error' && $@ == APR::TIMEUP) { ... }

with:

 if (APR::Error::foo($@, APR::TIMEUP)) { ... }

Not sure how to call that wrapper, APR::Error::check()?

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to