[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] RE: CGI-App configuration file


On Fri, 5 Dec 2003, Jesse Erlbaum wrote:
> IMHO, "configuration files" are a slippery slope.  They tend to start
> off simple, and rapidly get complicated.  Ultimately, they become their
> own "mini-languages".  The ultimate proof of this:  "sendmail.cf".
> (Yes, the "cf" stands for "configuration file").

AppConfig does a very good job of alleviating these sorts of concerns.

> In lieu of some separate file in a homegrown "language", I prefer
> putting configuration data into:
> 
>   * Class modules (*.pm)
>   * Instance scripts (*.cgi)

This requires the configurers to know Perl and even in the cases where 
it's worked extremely well (Makefile.PL) it hasn't lasted (we now have 
META.yaml for various requirements).  In less famous cases I've seen 
random sysadmins bollox this repeatedly.  The @ in an e-mail address 
meaning that config variable should be single quoted has been lost on not 
only sys admns, but several "famous" CGI developers.  How many FAQ's would 
this have not needed to appear in if people didn't try to do Perl-based 
configs?  Hundreds.

>   * Database tables

This is my personal favorite method, but it requires the same sysadmins 
that bollox perl config files to be able to understand SQL, which is even 
less forgiving than Perl.

> All of these resist the movement towards mini-languages.

Bull.  You're just making a minilanguage out of a subset of a bigger 
language and that bigger language is going to cause headaches almost 
every time.

> They all also use languages and systems which are already in use, thus
> reducing complexity.

Giving people an easy-to-use configuration model that mixes well with CGI 
or command line invocation will reduce config file complexity, the amount 
of Perl dedicated to dealing with config garbage and those things leads to 
money saved.

I've seen these sorts of problems crop up in several contexts, but I've
spent the last year dealing with a legacy CGI script that tried a mix of
Perl and flat files for configuration and it's just an unmitigated
disaster.  I've spent many days trying to deal with othewise quite
intelligent people who simply don't want or need to understand Perl's idea
of a string literal.  We've gradually replaced the old config with
AppConfig-readable files and the support headaches have gradually
receeded.  Thank goodness.  I was ready to fry some users over an open
spit.  ;)

-- 
</chris>

No, no, you're not thinking, you're just being logical.
-Niels Bohr, physicist (1885-1962)


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.