Subject: | Can't roundtrip a multiline scalar that starts with whitespace... |
This test script shows an example of a very simple multiline scalar that
YAML cannot round-trip. It loses one leading space on it's way out.
use Test::More tests => 3;
use YAML qw( Dump Load );
my $in = " FOO\nBAR BAZ\n";
# ^^ 2 spaces
ok( my $yaml = Dump( $in ), "Dump successful" );
ok( my $out = Load( $yaml ), "Load successful" );
is( $out, $in, "Roundtrip successful" );