I missed the Apache-Admin-Config module in my search for Apache config
file parsers, otherwise I would have not written a new one :) The
other parser was just announced after I finished this one is named
Apache::ConfigFile.
All three modules appear to treat the directives and contexts the
same, in that you can descend into the contexts to get directive's
specified there.
They could definitely be merged into a single module that does what
everybody needs. I don't have the time to do this myself, but would
could help out.
A common API would have to be designed so that it would have all of the
features people needed. Here's a quick review of the pluses and minuses
of the tree modules (obviously pro Apache::ConfigParser because it has
the features I need).
Apache::Admin::Config
Pros
Cons
Lack of documentation
Test suite with 2 tests
Apache::ConfigFile
Pros
Clear interface
Good documentation
Handles mod_perl <Perl> config directives
Overloaded method names to get config values
Automatic boolean conversion
Been around for a while
Cons
Test suite with one test
Apache::ConfigParser
Pro
Good documentation
Build tree structure of config allowing complicated
searches
Parses config file exactly as Apache does
Knows which directives can take relative path names
and makes them absolute automatically
Correctly parses directive values with "'s and \"'s
Allows searches on directives regardless of context
Allows searches up through context levels
Extensive test suite
Keeps track of where directives were set
Cons
Doesn't write out config files
No autoloaded calls
Not easily used interface
Is it possible to remove CPAN modules when a common interface is built?
Blair
Geoffrey Young wrote:
>
>
>
> >-----Original Message-----
> >From: Blair Zajac
> >To: [EMAIL PROTECTED]
> >Sent: 9/12/01 5:41 PM
> >Subject: Pre-announce Apache::ConfigParser
> >
> >Hello,
> >
> >This is a preannounce of Apache::ConfigParser. I wrote this to
> >allow programs separate from Apache to completely understand,
> >parse and manipulate Apache configuration files.
>
> BTW, I appreciate you posting an RFC, mainly because I feel as though the
> Apache module list has grown rapidly of late (which is not necessarily a bad
> thing) but grown without that many RFCs, feedback, or attempts to build on
> what others have already done.
>
> that said, is this all that different from
> CPAN/modules/by-module/Apache/Apache-Admin-Config-0.05.tar.gz
> ?
>
> I swore there was yet a third candidate in this realm, but I didn't see it
> on brief inspection.
>
> at any rate, can the two somehow be integrated into some mutually acceptable
> module?
>
> --Geoff