perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject [Fwd: MODPERL2 definition not defined]
Date Mon, 11 Nov 2002 09:51:37 GMT
Thanks for the forward Gary.

That's a bummer. We haven't had a test for this one and it certainly 
fails. I doubt this can be solved using IfDefine :(

Once <Perl> sections will be fully working the following will probably do:

     <Perl >
         use Apache::ServerUtil;
         unless (Apache::exists_config_define("MODPERL2")) {
                 require Some::ModPerl1::Module;
         }
     </Perl>


-------- Original Message --------
Subject: MODPERL2 definition not defined
Date: Wed, 6 Nov 2002 11:33:48 +0000
From: Gary Benson <gbenson@redhat.com>
To: modperl@perl.apache.org

(from https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=75194)

Hi,

The technique presented in 
<http://perl.apache.org/docs/2.0/devel/porting/porting.html#Requiring_a_specific_mod_perl_version_>
doesn't work with mod_perl 1.99 in the server config files.  The perl
code sample in the document (Apache::exists_config_define("MODPERL2"))
works, but <IfDefine MODPERL2> doesn't.

This is because <IfDefine> interpretation happens as the file is
parsed; mod_perl is defining MODPERL2 in a "pre_config" hook, which
happens after the file has been parsed, but before it has been
processed.

Cheers,
Gary

[ gbenson@redhat.com ][ GnuPG 85A8F78B ][ http://inauspicious.org/ ]

-- 


__________________________________________________________________
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


Mime
View raw message