Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 10735 invoked from network); 29 Jul 2005 00:13:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Jul 2005 00:13:48 -0000 Received: (qmail 24155 invoked by uid 500); 29 Jul 2005 00:13:48 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 24144 invoked by uid 500); 29 Jul 2005 00:13:47 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 24131 invoked by uid 99); 29 Jul 2005 00:13:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2005 17:13:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.77.29.165] (HELO secure.exclamationlabs.net) (66.77.29.165) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2005 17:13:40 -0700 Received: from [192.168.2.160] (pcp0010804675pcs.walngs01.pa.comcast.net [69.142.163.148]) (authenticated (0 bits)) by secure.exclamationlabs.net (8.11.6/8.11.6) with ESMTP id j6T0Dnm20407; Thu, 28 Jul 2005 19:13:49 -0500 Message-ID: <42E974B7.3050508@modperlcookbook.org> Date: Thu, 28 Jul 2005 20:13:43 -0400 From: Geoffrey Young User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040927 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Vivek Khera CC: mod_perl Dev Subject: Re: ModPerl::MethodLookup questionalbe recommendation References: In-Reply-To: X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Vivek Khera wrote: > I'm converting my main app to mp2. The following advice seems > incorrect to me: > > % perl -MModPerl::MethodLookup -e print_method is_main > 'is_main' is not a part of the mod_perl 2.0 API > use 'main' instead. not in the Apache 2.0 API > To use method 'main' add: > use Apache2::RequestRec (); > > > I believe the more appropriate replacement of is_main() would be > is_initial_req() from Apache2::RequestUtil(). in 1.3 is_main() was used to specify the initial request in a series of subrequests. is_initial_req() specifies _only_ the initial request coming from the client. in other words, a single browser request results in one and only one place where is_initial_req() is true, while it could potentially create several instances where is_main() is true. so... way back in the day people used to use $r->is_main() to spot the place where they could, say, call $r->notes and get the "main" request. in mp2 I guess you would do $r->main->notes and avoid the call to is_main() at all. anyway, I guess all I'm saying is that I don't think is_initial_req() ought to be the replacement for is_main() - is_initial_req() is very specific and still exists with the same functionality in 2.0. if someone was using is_main() in mp2 it's not necessarily true that is_initial_req() is what they need. of course main() isn't what they need either... :) --Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org