in reply to Configuration file design
Second rule is that it should be simple, which again would rule out XML, Yaml and Perl code.
I might format the config file like this:
root = /path/to/root filepath = /path/to/files server = ftp1 sourcepath = /source/path/on/server savepath = /save/files/here server = ftp2 savepath = /files/go/here sourcepath = /some/path/somewhereI've been using, and still use, lots of configuration files in different formats (most of them just for personal use). And while I try to make them have more or less the same syntax, I often find that every project benefits from a different syntax.
Some parsers I've used are simply line based, using hardly anything more than split. Sometimes, I write a Parse::RecDescent grammar.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Configuration file design
by castaway (Parson) on Jan 05, 2005 at 08:33 UTC |