[Catalyst-dev] Redux: config formats

Peter Edwards peter at dragonstaff.com
Sat Jun 10 09:18:30 CEST 2006


Config::General is okay for me as the default.
I found YAML a bit non-intuitive. 

Historically, I've used a combination of 

1) perl files
a) Top level bootstrap data.
b) Complex data structures that are written by Data::Dumper and can be
eval'd back in, for example location name -> location/postcode/zipcode
mappings.
Can be checked with 'perl -c' and easy for support staff to edit. Also
possible to use simple expressions and functions in the file, for example to
calculate file paths based on a root directory.

2) Text files: key = value or key = value1|value2|value3
Simple labels and dictionaries.

3) XML files
Complex menu layout with attributes.
Too long-winded and error-prone for human use but good for program use
provided you verify the output and keep a backup in case it breaks.

Regards, Peter

-----Original Message-----
From: catalyst-dev-bounces at lists.rawmode.org
[mailto:catalyst-dev-bounces at lists.rawmode.org] On Behalf Of Matt S Trout
Sent: 10 June 2006 03:51
To: Development of the elegant MVC web framework
Subject: [Catalyst-dev] Redux: config formats

INI is idiot-friendly but too limited

JSON is apparently only liked by me. Shrug.

XML ... yeah, right.

Programmers like YAML. Some of them really like it. Normal humans hate it. I

can't stand it either, if we really want to be whitespace sensitive I'd
rather 
use Inline::Python.

Nobody seems to hate Config::General although some people have some 
reservations. Worst criticism so far was "not architecturally pure", which I

think is pretty much irrelevant.

I say we bite the bullet and move to Config::General by default, leaving
YAML 
available as an option if and only if somebody writes a patch to embed a
cheat 
sheet in comments available by default.

What say you?

-- 
      Matt S Trout       Offering custom development, consultancy and
support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST.
Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/
+

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev at lists.rawmode.org
http://lists.rawmode.org/mailman/listinfo/catalyst-dev





More information about the Catalyst-dev mailing list