Subject: | Dumping to string fails |
I am trying to use YAML::Syck::DumpFile to dump data structures into a string (using either IO::String or IO::Scalar). With version 1.07 of YAML::Syck it works:
perl -MIO::String -MYAML::Syck -wE 'my $data; my $io = IO::String->new($data); YAML::Syck::DumpFile( $io, { a => 1, b => 2 } ); say $data'
---
a: 1
b: 2
and with version 1.27 it fails:
perl -MIO::String -MYAML::Syck -wE 'my $data; my $io = IO::String->new($data); YAML::Syck::DumpFile( $io, { a => 1, b => 2 } ); say $data'
Error writing to filehandle IO::String=GLOB(0x1a8ab48): Bad file descriptor
Let me know if you need any further information to help debug the problem.
Thanks,
Stephen Quinney