Bug#834999: YAML::XS generates broken multiline strings

Marco d'Itri md at linux.it
Sun Aug 21 11:18:33 UTC 2016


Package: libyaml-libyaml-perl
Version: 0.41-6+b1
Severity: grave

YAML::XS adds an extra \n at the end of each line.
The YAML module cannot read the generated files.

Test case attached.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libyaml-libyaml-perl depends on:
ii  libc6                       2.23-4
ii  perl                        5.22.2-3
ii  perl-base [perlapi-5.22.1]  5.22.2-3

libyaml-libyaml-perl recommends no packages.

libyaml-libyaml-perl suggests no packages.

-- no debconf information

-- 
ciao,
Marco
-------------- next part --------------
#!/usr/bin/perl

use v5.22;
use warnings;
use strict;

use File::Slurp;
use YAML::XS;

$_ = qq[line1
line2

line3
end
];

my $yaml = Dump($_);
print $yaml;
write_file('testyaml-data', $yaml);

-------------- next part --------------
#!/usr/bin/perl

use v5.22;
use warnings;
use strict;

use File::Slurp;
use YAML;

my $yaml = read_file('testyaml-data');
print $yaml;
print Load($yaml);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 630 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20160821/a65cc9d3/attachment.sig>


More information about the pkg-perl-maintainers mailing list