|There's more than one way to do things|
Human readable/writable serialization alternatives to YAML and XML ?by mandog (Curate)
|on Mar 06, 2009 at 20:43 UTC||Need Help??|
mandog has asked for the
wisdom of the Perl Monks concerning the following question:
What good human readable/writable data serialization options with good Perl support are there?
We're completely happy with Config::Simple and .ini files for the configuration info for our application.
Now we want to re-factor our Test::WWW::Mechanize tests so the test data is easier to follow, perhaps by separating test code from test data. I'm surprised that there isn't an obvious choice.
XML doesn't seem very human readable. There are 39 pages of results for the google query "xml sucks". There is even a web site devoted to that assertion.
YAML looks a bit better but the documentation is a bit thin. For example YAML::Manual::Tutorial is a line of text: "not yet been written." Worse there are a few apparently serious years old bugs. This could be an easy opportunity for us to contribute documentation...
I'm begining to think that for us Perl is actually more writeable/readable than XML,YAML,JSON,etc. Also, we don't have to learn something new to use Perl. Maybe we should put the test code in a module and move each sub that returns an array of test data into its own .t file. Simplifying somewhat and perhaps introducing syntax errors, our existing code is: