On Jul 20, 2006, at 9:07 PM, David Golden wrote:


$node is a YAML::Node and the EXISTS function only checks for things stored in the NODE property, not the HASH property. I'm not sure exactly what those two are supposed to be representing, but the point is that the "exists $node->{version}" returns false even though "$node->{version}" is true.

Gar.

How I missed that I have no idea. Clearly I was working on it and thought I solved it but didn't, as even M::B's own META.yml is screwed up.

You should see M::B 0.2802's META.yml though - even worse! =)

This does explain the totally bizarre behavior I was seeing which made me put the ... if exists() business in there to begin with.


Gee, I love YAML.  (Sigh.)


You and me both.


Dropping the "exists" or changing that to "ref $node->{version}" makes it all work just fine.


Not ideal either, but certainly better. I guess it would only fail if someone intends to have a version 0 or '' or whatever. Maybe I'll just concatenate with the empty string, though.

 -Ken


Reply via email to