perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: ACL filesystem incompatibility and potential race condition
Date Fri, 04 Mar 2005 16:07:23 GMT
Joe Schaefer wrote:
> Joe Schaefer <joe+gmane@sunstarsys.com> writes:
> 
> 
>>That way apps like apreq can subclass APR::Error
>>and just provide a strerror() method without
>>needing str() also, and the "$@" stringization
>>remains uniform.
> 
> 
> Here's a different approach that will accomplish the same 
> thing via can().  The upshot of this is that we don't need 
> to change the APR::Error::strerror() signature;  all 
> current tests pass with this patch.
> 
> Comments?

+1, but you probably need to deal with the case where can() fails?

> +        my $strerror = $_[0]->can("strerror");
>          Carp::confess("$_[0]->{func}: ($_[0]->{rc}) " .
> -                    APR::Error::strerror($_[0]->{rc}));
> +                    $strerror->($_[0]->{rc}));


-- 
__________________________________________________________________
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