Strangely, all of them but Perl have had no problem with No being false, but interestingly in Perl we are confused every now and then and load No as the string 'No'. What's going on here? :-)
Bugs from the sound of it. I'm sure the developers would love a nicely wrapped up test case and an RT bug report :-)
I don't see what's wrong with that; if "No" evaluates false, what about "NO", "no", "N" ? What about "Non", "Niet", "Nein" and "La'" ?
In YAML it can be a representation of a boolean value - see Boolean Language-Independent Type for YAML™ Version 1.1 for details. So it can make sense for a YAML parser to translate this to a false value in Perl land.
CPAN version numbers and their relationship to "1" have nothing to do with alpha status. A few authors adopt the <1==alpha|beta meaning but not most of them.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
use YAML::Syck;
$YAML::Syck::ImplicitTyping = 1;
Load("No"); # undef
I had ImplicitTyping on, but Ingy told me it should be off by default to save time and reduce confusion and improve compatibility. So... Blame him. :-)
Hi audrey.
Save time? Execution time? Please explain... I think YAML::Syck is fast enough for all of my needs.
Improve compatibility with what, older Perl modules (all of which are 'alpha' or 'beta' and should not guarantee API/backwards compatibility anyway)? I would vote for better interoperability with the other YAML-using languages, as it is one of YAML's biggest strength.
Reduce confusion? Hm, that's not what I experienced. Implicit typing is also one of YAML's basic features.
So, turn it and keep it on please :)
Implicit typing should only be enabled if it doesn't interfere with round-tripping, Perl's polymorphic scalars seem to me to make this impossible.
ImplicitTyping--
perlmonks.org content © perlmonks.org and adrianh, audreyt, bsb, dgaramond2, diotalevi, wazoox
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03