perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [mp2] one more pass on mp2/apr read() functions
Date Wed, 09 Jun 2004 16:05:34 GMT
Joe Schaefer wrote:
> Stas Bekman <stas@stason.org> 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:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message