Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 62047 invoked from network); 15 Jul 2005 20:26:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Jul 2005 20:26:28 -0000 Received: (qmail 11394 invoked by uid 500); 15 Jul 2005 20:26:26 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 11307 invoked by uid 500); 15 Jul 2005 20:26:25 -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 11263 invoked by uid 99); 15 Jul 2005 20:26:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2005 13:26:25 -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 [62.173.71.110] (HELO bodger.sergeant.org) (62.173.71.110) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 15 Jul 2005 13:26:20 -0700 Received: (qmail 3843 invoked by uid 510); 15 Jul 2005 20:26:27 -0000 Received: from toronto-HSE-ppp3934637.sympatico.ca (HELO [192.168.2.14]) (70.49.21.117) by bodger.sergeant.org (qpsmtpd/0.28) with ESMTP; Fri, 15 Jul 2005 20:26:27 +0000 Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: modperl@perl.apache.org From: Matt Sergeant Subject: [PATCH] Apache::Test can never use mp1 with mp2 installed Date: Fri, 15 Jul 2005 16:25:59 -0400 To: mod_perl Dev X-Mailer: Apple Mail (2.622) X-Qpsmtpd-Auth: True X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N There's a bug in Apache::Test that prevents it from working properly when you're trying to test something with mp1 when you've got mp2 installed. What happens is that Apache::TestConfig does this: use constant IS_MOD_PERL_2 => eval { require mod_perl2 } || 0; Which of course is wrong, that should be IS_MOD_PERL_2_INSTALLED for a start, but I haven't patched that. What then happens later is in TestRunPerl we do: if ($rev == 2) { eval { require mod_perl2 }; } else { eval { require mod_perl }; } my $mp_ver = $mod_perl::VERSION; Which now because mod_perl2 is already loaded, always returns the mp2 version. Side comment: This stuff is a real maze of twisty passages - the only way I could find to debug this was to add Carp::cluck() to mod_perl2.pm so I knew what was loading it. I wish it were written a bit simpler. Maybe I'm underestimating the complexity of what it's trying to do. Patch (mail.app will strip trailing whitespace, so apply with -b or just do it manually): --- lib/Apache/TestRunPerl.pm.orig Fri Jul 15 16:17:05 2005 +++ lib/Apache/TestRunPerl.pm Fri Jul 15 16:17:50 2005 @@ -49,6 +49,7 @@ my $ver = $test_config->server->{version}; # sanity checking and loading the right mod_perl version + delete $INC{'mod_perl.pm'}; if ($rev == 2) { eval { require mod_perl2 }; } else { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org