in reply to Saving application configuration to files

The nicest config file format is YAML. Unfortunately the perl module YAML.pm has some bugs, but the module should be OK for simpler cases.
  • Comment on Re: Saving application configuration to files

Replies are listed 'Best First'.
Re: Re: Saving application configuration to files
by flyingmoose (Priest) on Mar 29, 2004 at 20:16 UTC
    I too love YAML and use YAML.pm often, though I do think I might switch to the inifiles modules when I don't need to serialize Massive Convoluted Datastructures (TM). What are these bugs you speak of? Well, yes, CPAN has a 'bugs' section listed for YAML, though it mostly seems to list things that just aren't implemented yet. Nothing that would reach out and bite you really.
      Look for example at the two items in the "important" section (one of them is mine). These are problematic if you're serializing/deserializing arbitrary data. On the other hand, if zou're just using a configuration file with fixed keys and relatively simple values (with no newlines, for example), then YAML should be fine.
Re: Re: Saving application configuration to files
by nmcfarl (Pilgrim) on Mar 31, 2004 at 00:16 UTC
    I personally use yaml for all of my configuration needs these days, and though they tend to be simple, YAML is more than OK. It's straight forward and quite easy to read and write by hand. The perl interface is easy. Everything is easy. Don't think I can recommend it enough.