in reply to AppConfig or XML::Simple for All my modules?

IMO, XML is too verbose for configuration files meant to be edited by humans. If the config will only be read/written by another program, then it really doesn't matter what format it's in.

One of the most irritating things to me about XML configuration files is that a key/value pair can be expressed as an attribute or an element without any loss of information. I don't think that TMTOWTDI should apply in configuration files :-)

I think the INI format strikes the best balance among compactness, readability and expressiveness. I'd venture to say that anyone who would be editing a configuration file knows the format, and it's very simple to edit.

The other end of the spectrum is serialized (via Data::Dumper or Data::Denter) Perl data structures. These are extremely expressive, very compact but readable only to folks who know Perl fairly well. Depending on your audience the cost of this can vary.

Because of their expressiveness, Perl data structures also have the tendency to lull you into putting very complicated data structures in your configuration. IME, this eventually winds up biting you in the rear.

Chris
M-x auto-bs-mode

  • Comment on Re: AppConfig or XML::Simple for All my modules?