Joe Schaefer wrote:
Joe Schaefer <[EMAIL PROTECTED]> 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:[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]