perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [PATCH] lib/ModPerl/BuildOptions.pm
Date Fri, 08 Apr 2005 17:11:46 GMT
Philip M. Gollucci wrote:
> Hi,
> 
> perl Makefile.PL MP_APXS=apx MP_COMPAT_1X=0
> 
> Reading Makefile.PL args from @ARGV
>    MP_APXS = /home/pgollucci/dev/inst/httpd/2.1.5-dev/worker/bin/apxs
>    MP_COMPAT_1X =
>    MP_MAINTAINER = 1
> 
> That should be: Note the 0
> 
> Reading Makefile.PL args from @ARGV
>    MP_APXS = /home/pgollucci/dev/inst/httpd/2.1.5-dev/worker/bin/apxs
>    MP_COMPAT_1X = 0
>    MP_MAINTAINER = 1
> 
> Heres a patch to fix that (trivial):
> 
> Index: lib/ModPerl/BuildOptions.pm
> ===================================================================
> --- lib/ModPerl/BuildOptions.pm (revision 160271)
> +++ lib/ModPerl/BuildOptions.pm (working copy)
> @@ -101,7 +101,7 @@
> 
>          if (/^MP_/) {
>              my($key, $val) = split $param_qr, $_, 2;
> -            $val ||= "";
> +            $val ||= "" unless $val eq '0';
>              $continue = $val =~ s/\\$// ? $key : "";
> 
>              if (!$table->{$key} and $opts & UNKNOWN_FATAL) {
> END

That will be a  problem if MP_COMPAT_1X= is passed. I've commited the one below:

Index: lib/ModPerl/BuildOptions.pm
===================================================================
--- lib/ModPerl/BuildOptions.pm (revision 160561)
+++ lib/ModPerl/BuildOptions.pm (working copy)
@@ -101,7 +101,7 @@

         if (/^MP_/) {
             my($key, $val) = split $param_qr, $_, 2;
-            $val ||= "";
+            $val ||= "" unless defined $val && $val eq '0';
             $continue = $val =~ s/\\$// ? $key : "";

             if (!$table->{$key} and $opts & UNKNOWN_FATAL) {

Thanks Philip!


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