You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Howdy,
I had a hash that had a key that happened to start w/ three dots for an
ellipses and I kept getting corrupt YAML files.
I narrowed it down this smallest case scenario:
Compare:
perl -MData::Dumper -MYAML::Syck -e 'my $y=YAML::Syck::Dump({
$ARGV[0] => ""});print $y;print Dumper(Load($y));' '... '
to
perl -MData::Dumper -MYAML::Syck -e 'my $y=YAML::Syck::Dump({
$ARGV[0] => ""});print $y;print Dumper(Load($y));' '... X'
If dot-dot-dot-space-something means something in YAML then it
should be quoted if part of a data structure.
I have verified that quoting it makes it valid again.
---
... X: ''
to
---
"... X": ''
(This is a form-reply that isn't specific to your particular report)
YAML::Syck has just acquired one new maintainer (me), it still doesn't
have anyone that *cares* about it. But I'm willing to help solve your
report & release a new version with the fix if it's easy for me.
It now has a Git repository at:
http://github.com/avar/YAML-Syck
If your report is a patch that fixes a problem, great. Please remake
the patch against Git by forking that repo and sending me a pull
request on GitHub (or an update to this bug if you prefer
git-format-patch(1) or some other repo provider..). Make sure to
include a test for what you fixed.
If your report is some code that fails (and you have a testcase for
it) a patch against the test suite to demonstrate that failure would
be very useful. It's OK if the test crashes and burns, see
Test::More's docs for how to make TODO tests that fail now, but
shouldn't. Even if it segfaults perl C<system $^X => qw/ -Mblib
-MYAML::Syck .../> or something like that and checking the return
value will do.
This looks like it could be fixed with something very similar to my
":foo" fix. I.e. just check if the string begins with ".", and if so
always auto-escape it.
The text was updated successfully, but these errors were encountered:
Migrated from rt.cpan.org#52432 (status was 'open')
Requestors:
Attachments:
From [email protected] on 2009-12-04 14:49:25:
From [email protected] on 2010-05-20 11:07:23:
From [email protected] on 2010-07-16 02:45:25:
From [email protected] on 2010-07-23 23:37:01:
The text was updated successfully, but these errors were encountered: