On Friday, December 19, 2003, 9:02:05 AM, Ara.T.Howard wrote:

>> I just got it :-). However it seems like cheating ;-) -- there were no
>> tabs in Gavin's example. 

> it may seem like cheating, but i spent twenty minutes debugging something just
> like this after advocating yaml based configs here at work and letting a real
> live user configure something - which immeadiately broke my software!

Interesting.  Thanks for the warning.

>> There are lots of issues with TABs in yaml, we all know. The common approach
>> is just to avoid them alltogether. I usually "untab" config files before
>> calling YAML::load

> well - i now do too.  the question is, why doesn't yaml?  currently i'm simply
> gsub'ing tabs for eight spaces and figure this _shouldn't_ breaky anything but
> haven't really looked into further.  i posted something a while back wondering
> if trailing space is _ever_ required in yaml

I guess that's up to the user.  Iff you know that no trailing spaces
are allowed in your domain, then remove them.

As for tabs, I would simply error out and tell the user to get rid of
that tabs.  Assigning a different number of spaces to a tab means
you'll get different interpretations of the document, I think.

Perhaps YAML could include one or two methods to do this kind of
common pre-processing, so we don't all duplicate the code?

Gavin