Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 24968 invoked from network); 4 Mar 2005 16:05:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Mar 2005 16:05:42 -0000 Received: (qmail 45881 invoked by uid 500); 4 Mar 2005 16:05:41 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 45867 invoked by uid 500); 4 Mar 2005 16:05:41 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 45851 invoked by uid 99); 4 Mar 2005 16:05:41 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.logilune.com (HELO mail.logilune.com) (195.80.154.36) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 04 Mar 2005 08:05:41 -0800 Received: from [127.0.0.1] (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id B2E061E1969; Fri, 4 Mar 2005 17:05:37 +0100 (CET) Message-ID: <42288750.2020401@stason.org> Date: Fri, 04 Mar 2005 11:05:36 -0500 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: Joe Schaefer Cc: dev@perl.apache.org Subject: Re: ACL filesystem incompatibility and potential race condition References: <4225BB2B.1050707@stason.org> <42264D18.3000503@stason.org> <4226711A.9000501@stason.org> <422710FA.2010600@stason.org> <4227AB9F.6000605@stason.org> <4227AFCB.6020502@stason.org> <87ll94rxli.fsf@gemini.sunstarsys.com> <4227BF9A.9010609@stason.org> <87hdjsrwfu.fsf@gemini.sunstarsys.com> <4227C5CC.9080405@stason.org> <87d5ugrtn5.fsf@gemini.sunstarsys.com> <4227E705.7010009@stason.org> <878y54rolr.fsf@gemini.sunstarsys.com> <4227EF30.2000504@stason.org> <874qfsrnfa.fsf@gemini.sunstarsys.com> <4227F40E.6050101@stason.org> <87wtsoq6uo.fsf@gemini.sunstarsys.com> In-Reply-To: <87wtsoq6uo.fsf@gemini.sunstarsys.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Joe Schaefer wrote: >>>No good, IMO. How users trap errors is for them to decide, not us. >>>Their eval blocks might be wrapping a large section of third-party >>>code, and not all of the trapped exceptions will come from mod_perl. >> >>that's why they first need to check >> >> if (ref $@ eq 'APR::Error') { check rc code here } >> >>but what do I know, all I see is the tests... > > > Yup, but the exception handling code may have been written > years before apr ever existed. So we really shouldn't be > generating spurious exceptions based on how some crufty > old code treats $@. Agreed. >>>If it were my decision, I'd set fallback => 1 and optimize >>>that by providing subs for the common operations, like '=='. >> >>sounds good to me. Go for it then, Joe. > > > Will do. While I'm at it, I'd also like to redo strerror > to become a class method, so we'd implement APR::Error::str() > this way instead: > > sub str { > my $class = ref $_[0]; > return sprintf "%s: (%d) %s at %s line %d", $_[0]->{func}, > $_[0]->{rc}, $class->strerror($_[0]->{rc}), > $_[0]->{file}, $_[0]->{line}; > } > > That way apps like apreq can subclass APR::Error > and just provide a strerror() method without > needing str() also, and the "$@" stringization > remains uniform. > > Thoughts? +1 (don't forget to update the docs :0) -- __________________________________________________________________ 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