Re: Config blocks

2003-06-10 Thread William A. Rowe, Jr.
Encouraged, although if we do overhaul the parser from two to three passes
you might have a bit of porting work, and your module probably won't remain
compatible with most apache 'configurators'.

If you are doing your own thing, look at macro or perl modules.  If you are
implementing a scoped apache block, look at mod_proxy instead, which
processes proxy 'location' directives.  It's a good example of adding new
Apache directive contexts.

Bill

At 12:31 PM 6/10/2003, Marc M. Adkins wrote:
Is adding 'blocks' (e.g. Perl.../Perl) in configuration files encouraged
or discouraged?  I've been considering one such in a module of mine, and
looking at example code in mod_macro and mod_perl that does this type of
thing.  The code to add a block isn't nearly as clean as code to add a
single-line directive.  I was thinking that perhaps adding blocks was
discouraged (perhaps because of apps like webgui).  Or perhaps it is just
rare enough that it hasn't been codified in the API yet.

mma




RE: Config blocks

2003-06-10 Thread Marc M. Adkins
 Encouraged, although if we do overhaul the parser from two to three passes
 you might have a bit of porting work, and your module probably
 won't remain compatible with most apache 'configurators'.

So it goes.

 If you are doing your own thing, look at macro or perl modules.
 If you are
 implementing a scoped apache block, look at mod_proxy instead, which
 processes proxy 'location' directives.  It's a good example of
 adding new
 Apache directive contexts.

The mod_macro and mod_perl code both seem to read from the configuration
file via ap_cfg_getline until they find the terminating tag for the block.
I'm unable to find a corresponding loop in mod_proxy.  It looks, instead, as
if ap_walk_config is used instead.  Does this mean that at the time of the
call to process the open tag of the block the configuration file has already
been processed into a tree structure?  'Cause that certainly makes life a
_lot_ easier.

mma