Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 72945 invoked from network); 9 Aug 2005 15:44:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Aug 2005 15:44:31 -0000 Received: (qmail 11901 invoked by uid 500); 9 Aug 2005 15:44:22 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 11879 invoked by uid 500); 9 Aug 2005 15:44:22 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 11866 invoked by uid 99); 9 Aug 2005 15:44:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 08:44:21 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jwheeler@datademons.com designates 216.16.242.247 as permitted sender) Received: from [216.16.242.247] (HELO trinity.dpeople.ca) (216.16.242.247) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 08:44:43 -0700 Received: from fw-link-2.cyberus.ca ([209.195.78.49] helo=[10.20.1.142]) by trinity.dpeople.ca with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1E2WHd-0001Wo-LN for modperl@perl.apache.org; Tue, 09 Aug 2005 11:44:54 -0400 Message-ID: <42F8CF52.1030607@datademons.com> Date: Tue, 09 Aug 2005 11:44:18 -0400 From: Justin Wheeler User-Agent: Debian Thunderbird 1.0.2 (X11/20050602) X-Accept-Language: en-us, en MIME-Version: 1.0 To: modperl@perl.apache.org Subject: [MP2] mod_perl 1.0 -> mod_perl 2.0 conversion woes. Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SA-Score: -2.3 X-Antivirus-Scanner: Marked clean by ClamAV X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I realise there's a good chance my issue is my own stupidity, but I'm hoping someone else can help out -- I've searched this mailing list and google, all to no avail. I am in the midst of trying to convert my software from mod_perl 1 to mod_perl 2 without the use of Apache2::Compat. I have imported (I think) all of the necessary modules, and changed the constants to read Apache2::Const::OK|DECLINED|etc. I have made the necessary conversions in the code, etc. My Apache config simply reads: PerlResponseHandler deBiz::Main So when I fetch a URL, it calls deBiz::Main::handler just fine. My code works by doing what it must do, and then doing a push_handlers to move onto the next function, that way, any given part of the module can return something other than DECLINED and it will quit at that point. It all worked just fine in mod_perl 1.0 The functions it calls in order are: handler -> dbconnect -> session_check -> prepare_data -> sendpage And it works by calling: Apache2::ServerUtil->server->push_handlers('PerlResponseHandler' => \&functionname); So, the program runs on index.html, and works just fine.. it calls each function perfectly in order as it's supposed to. Then, when anything referenced by the page (ie an image, or favicon.ico) is requested in the same HTTP session by the browser, mod_perl tries to parse it by starting over at &dbconnect() instead of going back to the original &handler(). Even if I set a variable and look for its value in dbconnect and reset handler and return DECLINED, it just ends and refuses to run &handler(). As I said before, it works just fine in mod_perl 1.0, and only broke as of mod_perl 2.0. Thoughts/ideas? Justin