httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: apxs broken
Date Thu, 06 Sep 2001 17:32:24 GMT
On Fri, 7 Sep 2001, Stas Bekman wrote:

> On Thu, 6 Sep 2001, Ryan Bloom wrote:
>
> > On Thursday 06 September 2001 10:03, Stas Bekman wrote:
> > > On Thu, 6 Sep 2001, Ryan Bloom wrote:
> > > > On Thursday 06 September 2001 09:35, Stas Bekman wrote:
> > > > > On Thu, 6 Sep 2001, jean-frederic clere wrote:
> > > > > > It fixes the problem I had, thanks - Do not forget to commit
it -
> > > > >
> > > > > I don't have commit access to httpd. Ryan will probably commit for
me
> > > > > :)
> > > >
> > > > Doug beat me to it.  :-)
> > >
> > > it seems weird, but I can see the log from dougm, but apxs.in wasn't
> > > changed in cvs.  Do I miss something?
> >
> > It was changed for me.  :-?
>
> doh, it's a different patch :) I should have done this in first place.

Hmm, I think it's better to adjust (foo) as early as possible. that's
when the file is read in.

Also the regex that does s/(foo)/{foo}/ is cleaner in case someone was
doing $(foo)_bar with the current patch, this will break, since it makes
$foo_bar, whereas it should be better ${foo}_bar.

Here is a new patch + one more checking:

--- apxs.in.orig  Fri Sep  7 01:27:52 2001
+++ apxs.in	  Fri Sep  7 01:27:56 2001
@@ -245,6 +245,8 @@

     open IN, $file or die "cannot open $file: $!";
     while (<IN>){
+        # $(foo) => ${foo}
+        s|\$\(([^)]+)\)|\${$1}|g;
         if (/^\s*(.*?)\s*=\s*(.*)$/){
             $rh_config->{$1} = $2;
         }
@@ -261,7 +263,6 @@
             my $val = exists $config_vars{$arg}
                 ? $config_vars{$arg}
                 : $config_vars{lc $arg};
-            $val =~ s/[()]//g;
             $result .= eval qq("$val");
             $result .= ";;";
             $ok = 1;
@@ -270,7 +271,7 @@
             if (exists $internal_vars{$arg} or exists $internal_vars{lc $arg}) {
                 my $val = exists $internal_vars{$arg} ? $arg : lc $arg;
                 $val = eval "\$CFG_$val";
-                $result .= eval qq("$val");
+                $result .= eval qq("$val") if defined $val;
                 $result .= ";;";
                 $ok = 1;
             }


_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



Mime
View raw message