Re: config file tool
Justin Pryzby <firstname.lastname@example.org> writes:
>> I've written a tool that enable you to extract the information from
>> configuration files, check the data and write it back.
> Can you just extract the data too?
With a little modif of the main program, yes.
Now, the question is what you want to do with the data ? Display it ?
Store it in another format ? Audit it ? (I.e. compare actual vs
> I'm interested in hearing more.
The core of this tool is the configuration model where you describe
the content and constraints of your configuration data. This model is
used by Config::Model Perl modules .
Depending on your target configuration, the work needed to create this
model can be simple or quite complex. (I've provided with
Config::Model an example for /etc/fstab  )
With Config::Model and a model, you have a tool to create an tree
representation of your data (often referred as "configuration tree" in
the doc). You also have a way to check the consistency of your data in
the configuration tree.
Config::Model also provide a user interface. Currently there's only a
basic "readline" interface. A curse interface is on its way.
Now, there the problem of assigning data in the configuration
tree. For this you need to write a parser which will depend on the
syntax of your configuration file. If the structure of the file
matches the structure of the configuration model, this parser can be
If you only want to check data, a writer is not needed.
For more information, you can check the homepage on sourceforge 
(which needs a rework).
If you want to see a real life configuration model, you can look at
the model for xorg.conf  (which is in the complex range :-p ). Note
that this work is still experimental.
To get people started, I'm willing to help create model parser and
writer for simple configuration.
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner