Return-Path: Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 79242 invoked by uid 500); 21 Apr 2003 03:55:46 -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 79227 invoked from network); 21 Apr 2003 03:55:45 -0000 Received: from erato.logilune.com (HELO mail.logilune.com) (195.154.174.52) by daedalus.apache.org with SMTP; 21 Apr 2003 03:55:45 -0000 Received: from stason.org (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id AEF777B5C9; Mon, 21 Apr 2003 05:55:53 +0200 (CEST) Message-ID: <3EA36BC9.3070408@stason.org> Date: Mon, 21 Apr 2003 13:55:53 +1000 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Randy Kobes Cc: dev@perl.apache.org Subject: Re: finding mod_perl shared object on win32 References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Randy Kobes wrote: > On Mon, 31 Mar 2003, Stas Bekman wrote: > > >>Randy Kobes wrote: >> >>>On Fri, 28 Mar 2003, Stas Bekman wrote: >> > >>>>Randy, >>>> >>>>I've looked at this issue and I don't see this problem on >>>>linux. Admittedly there was a problem with using -apxs which >>>>was finding mod_perl.so when it wasn't supposed to, which >>>>I've fixed now in cvs. >>>> >>>>Currently the logic goes like this (at this moment only >>>>relevant to mod_perl 2.0 built as DSO): >>>> >>>>1. always ignore the whatever 'LoadModule perl_module path' >>>>was found in global httpd.conf (that's what pre_configure() >>>>does) >>>> >>>>2. look at the build config options, if such exists (which is >>>>the case when mod_perl was installed on the system or we are >>>>inside the core build), use the information from there >>>> >>>>3. otherwise die, saying oops, mod_perl is not installed >>> > [ ... ] > > Hi Stas, > I think I've figured out why this wasn't working for > me (having Apache-Test load the installed mod_perl.so for a 3rd > party module) - I'm doing this for a Perl where mod_perl 2 isn't > installed (I'm just making Apache-Test available), so the > build config options isn't available. > I guess this case is only a problem when using Apache 1.3. > What about calling pre_configure() only if Apache 2.0 is being > used, as in the following: > ========================================================== > Index: TestRun.pm > =================================================================== > RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v > retrieving revision 1.105 > diff -u -r1.105 TestRun.pm > --- TestRun.pm 27 Mar 2003 22:19:30 -0000 1.105 > +++ TestRun.pm 19 Apr 2003 16:48:20 -0000 > @@ -560,13 +560,14 @@ > > $self->getopts(\@argv); > > - $self->pre_configure() if $self->can('pre_configure'); > - > $self->{test_config} = $self->new_test_config; > > - $self->warn_core(); > - > $self->{server} = $self->{test_config}->server; > + > + $self->pre_configure() > + if ($self->can('pre_configure') && $self->{server}->{version} !~ /1.3/); > + > + $self->warn_core(); > > local($SIG{__DIE__}, $SIG{INT}); > $self->install_sighandlers; > ======================================================================= > I think this should only affect building 3rd party modules > with Apache 1.3, as things should have died long before this > if trying to build mod_perl 2 with Apache 1.3. Understood. How about this patch: Index: Apache-Test/lib/Apache/TestRunPerl.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRunPerl.pm,v retrieving revision 1.10 diff -u -r1.10 TestRunPerl.pm --- Apache-Test/lib/Apache/TestRunPerl.pm 26 Jan 2003 03:14:04 -0000 1.10 +++ Apache-Test/lib/Apache/TestRunPerl.pm 21 Apr 2003 03:53:53 -0000 @@ -14,8 +14,12 @@ sub pre_configure { my $self = shift; - Apache::TestConfig::config_parse_skip_module_add('mod_perl.c'); - + # don't pick up 'LoadModule ... mod_perl.so' from the global + # httpd.conf, when using the locally built .so in the tests + if (eval { require mod_perl } && $mod_perl::VERSION >= 1.99 && + eval {require Apache::Build} && Apache::Build::IS_MOD_PERL_BUILD()) { + Apache::TestConfig::config_parse_skip_module_add('mod_perl.c'); + } } sub configure_modperl { since this long conditional is already used elsewhere in Apache::Test should probably refactor it as an Apache::TestConfig::IS_MOD_PERL2_BUILD constant. __________________________________________________________________ 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