[Catalyst] YAML vs. *

Matt S Trout dbix-class at trout.me.uk
Fri Jun 9 18:20:27 CEST 2006


Dean Troyer wrote:
> On 6/9/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
>> A few (IMO) better options -
>>
>> Config::General -
>>
>> <View TT>
>>    INCLUDE_PATH __path_to('root')__
>> </View>
> 
> Too Apache-like...I've never cared for it because it can't make up
> it's mind what kind of format it really is.

Yes, it can. It's a kind of format designed to be reasonable for people to 
write and machines to read.

Sure, it loses points for architectural purity. But architectural purity gets 
you YAML.

>> What do you all think, then? (/me dons asbestos suit, waits for the holy war
>> to start :)
> 
> Simple.  The simpler the better.  And I totally understand why things
> like YAML developed because 'too simple' can't handle things
> resembling data structures.  But in the end I always end up with
> either just writing config files in Perl or using simple
> attribute-value pairs.  If you include a '=' in the syntax, it's
> simple enough to extend to using ',' to denote lists, etc.

Fair point, but there's no way in hell we're inventing our own.

> XML for config files is not simple.  I don't know how many hours I've
> spent tracking down problems in apps that use XML but only half-assed
> parse it so structural typos in the file aren't detected and nobody
> can figure out why it didn't work.  Including a validating parser in
> an app that doesn't otherwise use it is a waste.

No arguments.

> INI files are close, My biggest dislike is just that they're
> too-Windows-like.  So sue me.

Yeah. They're probably my second choice. I don't mind JSON, but it's not much 
better than YAML for most people, I suspect.

-- 
      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/ +



More information about the Catalyst mailing list