Problems? Is your data what you think it is? | |
PerlMonks |
Re^5: An Idiot's Guide to YAMLby mr_mischief (Monsignor) |
on Jun 09, 2007 at 06:25 UTC ( [id://620149]=note: print w/replies, xml ) | Need Help?? |
If it does, so what?
Colon-delimited files are great for strictly table-natured data. CSV is great for slightly more complex table-natured data. Windows-style INI files are widely supported and can handle grouping. Unfortunately, many things which look a little like them are found in the wild. XML is verbose, but it's standard, well-supported, and can represent arbitrarily complex relationships. Perl hashes are, within Perl programs, exactly as flexible on all three counts. They do come up a bit short if one decides to port a Perl program to another language, as either the config format changes or you end up having to parse Perl hashes in another language. Parsing Perl's hash syntax shouldn't be that difficult, but chances are the other language already has an XML library or seven. YAML seems to be an interesting solution to not much of a problem. I applaud you for wanting to learn it because it's interesting. That's enough reason to learn something. As for useful purpose, the legibility does seem nice from the examples I've seen. A lay person might be taught how to write it without being much intimidated. However, I think the standard for dealing with lay people these days is a pretty configuration wizard. So that, I think, limits the truest audience for YAML as a configuration tool to non-programming sysadmins.
In Section
Meditations
|
|