httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabien COELHO <>
Subject Re: FW: general/3563: I want to allow the definition and use of macros within runtime configuration files.
Date Mon, 21 Dec 1998 10:38:59 GMT


> I'm -1 on any further attempts to put a macro language into apache.  We've
> already got too much crap in this area.  We are doing nobody any good by
> inching our way towards turing completeness.  If that's a feature we want
> then just provide an option to spawn m4.  Let's not reinvent the wheel. 

I'm partially of this opinion, about not reinventing the wheel as a
principle. But

(1) I practiced m4 a lot. it's really special, especially the 
    unusual quoting stuff `'. I have spent weeks to deal with it.
    It is really instable and hard to use. The lexical conventions
    are not really compatible with apache html-style. for instance
    if you put a ' in an apache comment the script would just be 
    broken. If you append to use an m4 keyword in the middle of your
    definitions you would also run into troubles. I don't think that it 
    worth the investment for someone who just want to have nicer 
    configurations files.

    so I don't think m4 is good for this problem.

(2) I also know about cpp. cpp does make lexical assumptions which
    are not really compatible with apache configuration style. More
    over #define defines something to be expanded as a single line,
    which does not trouble C which is not line-oriented, but this
    is an issue for apache. Also the cpp macros are always active, 
    not just at some point, thus this may add new troubles in apache file,
    you must use names which are not used anywhere else.

    so I don't think cpp is good for this problem.

(3) I also know about the perl module. It's great but it means one
    have to be a perl-addict to use it.

In order to be consistent you should drop Include out of apache since it
is reinventing the wheel. However I think this is a good feature and I'm
using it. 

I don't think that the issue is Turing completeness here. It's rather to
have something practical and user-friendly, what may mean the addition of
such features, if proven useful.

> If m4 doesn't make you happy, then write a perl script which generates a
> config file as its output.

YAPS (Yet Another Perl Script;-). Sure, this is an alternative.

It is not integrated. I would need a makefile and not forget to run it
before starting apache. I invested in a module instead because I thougth
it is more use-friendly (it works for me, but it can be improved, and
needs to be tested). 

> I'd be happy with the Include directive learning how to spawn external
> programs.

Why not. 

Include m4 ...
Include cpp -DFOO ...
Include mypreprocessor -x ...

Or some IncludeExec ...

But if so I cannot use it directly on the main httpd.conf.
I can see other issues. Where to locate the error when one occurs.
"on line 35 of the output of ...". hummm.

Have a nice day,


View raw message