perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [mp2 patch] detection problems
Date Tue, 26 Apr 2005 18:19:44 GMT
Geoffrey Young wrote:
>>How about this patch:
> 
> 
> looks great, with possibly one exception.
> 
> 
>>Index: Makefile.PL
>>===================================================================
>>--- Makefile.PL (revision 164840)
>>+++ Makefile.PL (working copy)
>>@@ -9,7 +9,7 @@
>> use constant MIN_HTTPD_VERSION_DYNAMIC => '2.0.47';
>> use constant MIN_HTTPD_VERSION_STATIC  => '2.0.51';
>>
>>-my($old_modperl_version, $old_modperl_pm);
>>+my($old_modperl_version, $old_modperl_pm, $old_Apache2_pm);
>>
>> BEGIN {
>>     eval {
>>@@ -18,6 +18,7 @@
>>         if ($mod_perl::VERSION < 1.999_22 && $old_mp2) {
>>             $old_modperl_version = $mod_perl::VERSION;
>>             $old_modperl_pm = delete $INC{'mod_perl.pm'};
>>+            $old_Apache2_pm = delete $INC{'Apache2.pm'};
> 
> 
> will this catch the case where someone nuked Apache2.pm but has mod_perl.pm
> _not_ under Apache2/mod_perl.pm (as would happen with MP_APACHE2_INST=0) ?
> I don't think it will, but I'm not sure - it's these things that made my
> mind race :)

Well, my patch doesn't change the detection code, it just improves the 
diagnostics. So as previously it was supposed to detect that case (right) 
it should still work. The only problem with this case and the diagnostics 
that my patch adds is here:

+            push @dirs, $path if $path =~ /Apache2/;

which will fail to point out at the problematic directory.

So it should probably be:

   $path =~ /Apache2/ or $old_modperl_version > 1.99;

> other than that, I like the new "problem files" format.  +1.




-- 
__________________________________________________________________
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