YAML::PP Grant Report October 2017

See also my previous report on news.perlfoundation.org and blogs.perl.org.

In October, I have worked over 50 hours on YAML related stuff. Read on...


I added 23 tests to YAML Test Suite. I also added more JSON data to existing tests.

We have 271 tests now (216 valid, 55 error tests).


Currently, the YAML Test Matrix shows only results for valid tests.

I replaced the index page with a table that shows only the number of passing and failing tests for each framework, to get a quick overview.

This includes error tests as well.

See matrix.yaml.io.

YAML.pm LoadCode

While YAML.pm will get deprecated at some point, there are still bugs that should be fixed. @mohawk2++ found and fixed a bug when loading code in quoted scalars. I merged his pull requests (#180, #181, #182)

YAML::XS Boolean Support

If you ever dealt with booleans in YAML::XS, you might have noticed that they get converted to 1/0 like with every other existing YAML framework. But loaded YAML::XS booleans are kind of special, what allows them to be dumped as booleans again. It is not possible though (with pure perl), to add such new booleans to a data structure, though. Also because of the special kind of variable flag, it is readonly, so you cannot change it (you have to delete it first).

Modules like JSON::Validator do some extra logic because of this.

YAML::PP uses JSON::PP::Boolean, and now I also implemented this for YAML::XS.

So far this exists as a pull request.

Ingy requested to support boolean.pm too, so I will adjust the code for that.

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


From a user perspective there's probably not much exciting news.

I fixed quoted scalar handling. --- and ... at the beginning of a line are now always seen as document start and end, so in quoted scalars they are invalid as the spec defines it.

I also fixed some issues with block and plain multiline scalars.

I moved the block scalar handling to the grammar instead of parsing it manually. I want to do the same for plain multiline scalars.

I started to implement flow style (14 tests passing). During this I realized what kind of things I have to do before being able to handle flow collections as keys. One thing was the handling of properties (anchors, tags). They aren't global parser attributes anymore, but part of the event stack.

Flow style is only in a local branch, so nothing to see here yet. Stay tuned!

In general I'm refactoring things to be handled in the grammar. Header, footer and indentation are still handled manually so far.

I released YAML::PP 0.004_001.

Leave a comment

About tinita

user-pic just another perl punk,