> > Perhaps
> > 
> >      3. multi-level hash, i.e.
> >            $conf->{directory}->{'/'}->{sethandler}
> > 
> > This is, afaik, more in-line with what the <Perl>...</Perl> sections do.  I
> > would suggest making it so the output of this module could easily be fed into
> > the mod_perl configuration engine in the <Perl> sections.  This gives us the
> > ease of the second example with the programming simplicity of the first (i.e.,
> > no new functions).
> 
> I actually like this alot. My question would be how to parse something
> that didn't have one element, or that had multiple ones, for example I
> can envision:
> 
>         <Perl> </Perl>
>         <SomeContext "/a" "/b"> </SomeContext>
> 
> The first one exists, while the second one is (as far as I'm aware) only
> theoretical. However, should they be solved as:
> 
>     $conf->{perl}->{somesetting}
>     $conf->{somecontext}->{'/a'}->{'/b'}->{somesetting}

Not sure about the 'multi' context version. It's ugly though and I
hope it doesn't happen. However, for the 'no context' version, I
suggest: 

<Perl>
foo();
</Perl>
<Perl>
bar();
</Perl>

The you could have either:

   $conf->{perl}

returns

   foo();
   bar();

or

   ["foo();\n", "bar();\n"];

I *think* I prefer the latter.

-- 
Piers
BEGIN {$^H {integer} = sub {chr shift}; $^H=33<<12}
print 74,117,115,116,32,97,110,111,116,104,101,114;
print 32,80,101,114,108,32,72,97,99,107,101,114,10;


Reply via email to