ingydotnet / yaml-libyaml-pm

Perl Binding to libyaml
http://search.cpan.org/dist/YAML-LibYAML/
33 stars 37 forks source link

Support JSON::PP::Boolean #66

Closed perlpunk closed 6 years ago

perlpunk commented 7 years ago

When $YAML::XS::Booleans is true, it will load and dump JSON::PP::Boolean objects.

Currently, you have to load JSON::PP yourself. This should be done in XS, too.

Edit: JSON::PP will be loaded automatically now.

perlpunk commented 7 years ago

Like @jhthorsen suggsted on IRC, it might make sense to also load True and False additionally to true and false, since that's also quite common. I see that a lot in ansible files.

perlpunk commented 7 years ago

As discussed with @ingydotnet, it should be configurable which boolean class to use:

$YAML::XS::Boolean = 'boolean'; # or JSON::PP

working on how to get a string from a package variable in XS now...

perlpunk commented 6 years ago

got it working, I have to test a bit more, though. thanks to @hoehrmann for the help with getting the package var as a string.

perlpunk commented 6 years ago

@ingydotnet please review

perlpunk commented 6 years ago

squashed the commits, applied and released YAML-LibYAML-0.66_001.tar.gz