Skip Menu |
 

This queue is for tickets about the YAML-Syck CPAN distribution.

Report information
The Basics
Id: 46983
Status: resolved
Priority: 0/
Queue: YAML-Syck

People
Owner: Nobody in particular
Requestors: ddascalescu+perl [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Trailing whitespace at first EOL when dumping a hash
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1245113520-13950-706"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 354
Download (untitled) / with headers
text/plain 354b
When dumping a hash, YAML::Syck outputs a trailing whitespace at the end of the first line, so that the first line is "--- \n". This causes various problems: trailing whitespace is invisible in most text editors; other text editors trim trailing whitespace; which ends up in tests that fail even though the output appears identical. Test file attached.
Subject: yaml-no-trailing-whitespace.t
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1245113520-13950-705"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/octet-stream; name="yaml-no-trailing-whitespace.t"
Content-Disposition: inline; filename="yaml-no-trailing-whitespace.t"
Content-Transfer-Encoding: base64
Content-Length: 209
use strict; use Test::More tests => 1; use YAML::Syck; # http://rt.cpan.org/Public/Bug/Display.html?id=46983 unlike( Dump({lou => 'is my cat'}), qr/^--- /, "no trailing whitespace after the leading '---'" );
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6772-1274353960-1350.46983-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1046
(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.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6772-1274353960-1350.46983-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-6772-1274353960-1350.46983-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2371-1279571109-1828.46983-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 275
Download (untitled) / with headers
text/plain 275b
I'm making this a wish list item. patches welcome, but otherwise I don't see this getting fixed. Any fix would have to be fully backwards compatible, which I'm not sure this would be. NOTE I also found that there's a leading space on references to duplicate items too. (&1)
X-RT-Interface: REST
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
RT-Message-ID: <rt-4.0.18-11744-1494493043-1089.46983-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 73
Ticket migrated to github as https://github.com/toddr/YAML-Syck/issues/38


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.