[Catalyst] YAML vs. *
Aran Deltac
aran at arandeltac.com
Fri Jun 9 19:39:02 CEST 2006
On 6/9/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> I love YAML as a serialisation format for data transfer, but so far as stuff
> like config files that are designed for human write / machine read, I
> personally think it sucks. Massively.
>
> And for hysterical raisins it's currently our default config file formats, and
> I see users running into trouble getting their myapp.yml to parse right all
> the flipping time. So, I'm wondering if this is just me being a YAML-hating
> heretic or if other people are of the same opinion.
Or both?
> A few (IMO) better options -
>
> Config::General -
This looks like XML. XML is a language for writing documents, IMO,
nothing more. A big thumbs down.
> <View TT>
> INCLUDE_PATH __path_to('root')__
> </View>
>
> JSON -
This gets my vote. Anyone that use complex perl data structures
should be able to use JSON. Stupidly simple syntax. Only drawback is
that non-techies will have a hard time editing it. But, thats not a
biggy, and if you want that use INI files.
Aran
> {
> 'View::TT': {
> INCLUDE_PATH: "__path_to('root')__"
> }
> }
>
> INI-style -
Like I said, use it if you have non-technical people editing the
configs. Maybe ConfigLoader could be modified to load multiple
configs. So, we could have a JSON with most of the config, and then
an INI with some of the things that the non-techies need access too.
> [View::TT]
> INCLUDE_PATH=__path_to('root')__
>
> What do you all think, then? (/me dons asbestos suit, waits for the holy war
> to start :)
Of all the people to start a holy war... :)
Aran
> --
> 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 mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
More information about the Catalyst
mailing list