Thinking about configurations

brian_d_foy on 2004-05-11T06:16:04

Someone told me the other day that the person who could figure out how to easily configure software who be rich beyond any dreams of avarice.

By easily, I think he probably meant something like what DBI has done for databases---even those things might be different behind the scenes, humans interact with it in the same way.

Once I thought about it, I realized how many attempts I have seen (or taken part in) to do that. I have seen a lot of web interfaces (and even created a few), interacctive programs, autoconf style things and so on. What a mess!

This reminds me of some advice I got in graduate school: these problems have not been solved because nobody wants to work on them, I think meaning that they are either unrewarding or intractable.

A long time ago, I took over the ConfigReader::Simple module, which handles line-oriented configuration files, and it has mostly made me happy. However, all sorts of other things are going on in the world: Apache style configuration files, perl code as configuration, configuration by script editing (oh dear!), setting environment variables (a recent favorite sin of mine), command-line argurments (and the shell aliases to hide them), and all sorts of other things.

I have been sitting under the configuration tree for a while without illumination. Anyone else have any ideas?


Makefile.PL

inkdroid on 2004-05-11T11:28:25

I've been looking closer at Python these days and was suprised to learn that the module install process:

python setup.py build python setup.py install

Lacks a *standard* testing call, so there is no

python setup.py test

Even if the internals of ExtUtils::MakeMaker are gnarly, and make insn't always available, I sure do appreciate having:

perl Makefile.PL make make test make install

and shiny new:

perl Build.PL perl Build perl Build test perl Build install

I also like code generators which ask me questsions and then *write* the code for me with the correct configuration. I guess this doesn't work in all situations, but it's fun...especially in a text friendly language like Perl.

Config::Auto

Simon on 2004-05-12T23:07:40

I wrote this module after deciding I never wanted to write another configuration file parser again. Try it.