Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML CPAN distribution.

Report information
The Basics
Id: 74826
Status: open
Priority: 0/
Queue: YAML

People
Owner: Nobody in particular
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.79
Fixed in: (no value)



Subject: test fixes for 5.16 and #74687 #73702
Download (untitled) / with headers
text/plain 387b
I've combined both patches in #74687 #73702, fixed it for perl5.8.5 B::Deperase 0.67 and also fixed 5.16. tested with all perls. just 5.8.4 fails because of schwern EUMM. works with older EUMM though. or } expected while parsing object/hash, at character offset 400 (before ""author":["Ingy d\x{f6}...") at /usr/local/lib/perl5/5.8.4/CPAN/Meta/Converter.pm line 23 -- Reini Urban
Subject: YAML-0.79.patch
Download YAML-0.79.patch
text/x-diff 1.7k
difforig YAML-0.79 diff -u YAML-0.79/t/dump-code.t.orig --- YAML-0.79/t/dump-code.t.orig 2012-01-02 01:44:27.000000000 -0600 +++ YAML-0.79/t/dump-code.t 2012-02-09 14:10:25.000000000 -0600 @@ -1,10 +1,14 @@ use t::TestYAML tests => 7; +use YAML (); # [CPAN #74687] must load before B::Deparse for B::Deparse < 0.71 use B::Deparse; if (new B::Deparse -> coderef2text ( sub { no strict; 1; use strict; 1; }) =~ 'refs') { local $/; - (my $data = <DATA>) =~ s/use strict/use strict 'refs'/g; + (my $data = <DATA>) =~ s/use strict/use strict 'refs'/g if $] < 5.015; + if ($B::Deparse::VERSION > 0.67 and $B::Deparse::VERSION < 0.71) { # [CPAN #73702] + $data =~ s/use warnings;/BEGIN {\${^WARNING_BITS} = "UUUUUUUUUUUU\\001"}/g; + } open DATA, '<', \$data; } diff -u YAML-0.79/t/dump-perl-types.t.orig --- YAML-0.79/t/dump-perl-types.t.orig 2011-04-19 07:02:48.000000000 -0500 +++ YAML-0.79/t/dump-perl-types.t 2012-02-09 14:10:42.000000000 -0600 @@ -2,6 +2,18 @@ filters { perl => ['eval', 'yaml_dump'] }; +use YAML (); # [CPAN #74687] must load before B::Deparse for B::Deparse < 0.71 +use B::Deparse; +if (new B::Deparse -> coderef2text ( sub { no strict; 1; use strict; 1; }) + =~ 'refs') { + local $/; + (my $data = <DATA>) =~ s/use strict/use strict 'refs'/g; + if ($B::Deparse::VERSION > 0.67 and $B::Deparse::VERSION < 0.71) { # [CPAN #73702] + $data =~ s/use warnings;/BEGIN {\${^WARNING_BITS} = "UUUUUUUUUUUU\\001"}/g; + } + open DATA, '<', \$data; +} + no_diff; run_is perl => 'yaml'; @@ -36,7 +48,7 @@ --- !!perl/code | { use warnings; - use strict 'refs'; + use strict; print "Hello, world\n"; } @@ -82,7 +94,7 @@ CODE: !!perl/code | { use warnings; - use strict 'refs'; + use strict; print "Hello, world\n"; }
Updated patch for still failing 0.80 attached -- Reini Urban
Subject: 0001-fix-for-CPAN-74826-CPAN-74687-and-73702.patch
From 158309106e39902c42e24fdfe43dc29ad61aec87 Mon Sep 17 00:00:00 2001 From: Reini Urban <rurban@cpanel.net> Date: Mon, 20 Feb 2012 20:39:57 -0600 Subject: [PATCH] fix for CPAN#74826: CPAN #74687 and #73702 --- t/dump-code.t | 7 ++++--- t/dump-perl-types.t | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/t/dump-code.t b/t/dump-code.t index 8d30196..197831b 100644 --- a/t/dump-code.t +++ b/t/dump-code.t @@ -1,12 +1,13 @@ use t::TestYAML tests => 7; +use YAML (); # [CPAN #74687] must load before B::Deparse for B::Deparse < 0.71 use B::Deparse; if (new B::Deparse -> coderef2text ( sub { no strict; 1; use strict; 1; }) =~ 'refs') { local $/; - (my $data = <DATA>) =~ s/use strict/use strict 'refs'/g; - if ($B::Deparse::VERSION < 0.71) { - $data =~ s/use warnings;/BEGIN {\${^WARNING_BITS} = "UUUUUUUUUUUU\\001"}/g; + (my $data = <DATA>) =~ s/use strict/use strict 'refs'/g if $] < 5.015; + if ($B::Deparse::VERSION > 0.67 and $B::Deparse::VERSION < 0.71) { # [CPAN #73702] + $data =~ s/use warnings;/BEGIN {\${^WARNING_BITS} = "UUUUUUUUUUUU\\001"}/g; } open DATA, '<', \$data; } diff --git a/t/dump-perl-types.t b/t/dump-perl-types.t index c775b56..738ca11 100644 --- a/t/dump-perl-types.t +++ b/t/dump-perl-types.t @@ -2,6 +2,18 @@ use t::TestYAML tests => 14; filters { perl => ['eval', 'yaml_dump'] }; +use YAML (); # [CPAN #74687] must load before B::Deparse for B::Deparse < 0.71 +use B::Deparse; +if (new B::Deparse -> coderef2text ( sub { no strict; 1; use strict; 1; }) + =~ 'refs') { + local $/; + (my $data = <DATA>) =~ s/use strict/use strict 'refs'/g; + if ($B::Deparse::VERSION > 0.67 and $B::Deparse::VERSION < 0.71) { # [CPAN #73702] + $data =~ s/use warnings;/BEGIN {\${^WARNING_BITS} = "UUUUUUUUUUUU\\001"}/g; + } + open DATA, '<', \$data; +} + no_diff; run_is perl => 'yaml'; @@ -36,7 +48,7 @@ sub { print "Hello, world\n"; } --- !!perl/code | { use warnings; - use strict 'refs'; + use strict; print "Hello, world\n"; } @@ -82,7 +94,7 @@ NAME: var3 CODE: !!perl/code | { use warnings; - use strict 'refs'; + use strict; print "Hello, world\n"; } -- 1.7.5.4
From: paul [...] city-fan.org
Download (untitled) / with headers
text/plain 849b
On Mon Feb 20 21:40:21 2012, RURBAN wrote: Show quoted text
> Updated patch for still failing 0.80 attached
This seems to be trying to work around Perl RT#35857 in two different ways, and for me it's breaking with B::Deparse 0.69 and YAML 0.81. The workaround I suggested in CPAN RT#73702 of changing the expected test output for B::Deparse < 0.71 is still there, but there's also the early loading of YAML suggested by Zefram in CPAN RT#74687, which prevents the Perl RT#35857 issue being tickled in the first place and hence the "correct" expected output always appears, even for B::Deparse < 0.71. Attached patch drops the workaround from CPAN RT#73702 in favour of the better solution from CPAN RT#74687, which I believe is all that's needed. Tested with a variety of Perls from 5.8.5 to 5.14.2, and B::Deparse 0.67, 0.69, 0.71 and various more recent ones.
Subject: YAML-0.81-rt74826.patch
--- t/dump-code.t +++ t/dump-code.t @@ -6,9 +6,6 @@ if (new B::Deparse -> coderef2text ( sub =~ 'refs') { local $/; (my $data = <DATA>) =~ s/use strict/use strict 'refs'/g if $] < 5.015; - if ($B::Deparse::VERSION > 0.67 and $B::Deparse::VERSION < 0.71) { # [CPAN #73702] - $data =~ s/use warnings;/BEGIN {\${^WARNING_BITS} = "UUUUUUUUUUUU\\001"}/g; - } open DATA, '<', \$data; } --- t/dump-perl-types.t +++ t/dump-perl-types.t @@ -8,9 +8,6 @@ if (new B::Deparse -> coderef2text ( sub =~ 'refs') { local $/; (my $data = <DATA>) =~ s/use strict/use strict 'refs'/g; - if ($B::Deparse::VERSION > 0.67 and $B::Deparse::VERSION < 0.71) { # [CPAN #73702] - $data =~ s/use warnings;/BEGIN {\${^WARNING_BITS} = "UUUUUUUUUUUU\\001"}/g; - } open DATA, '<', \$data; }
Download (untitled) / with headers
text/plain 247b
This issue has been copied to: https://github.com/ingydotnet/yaml-pm/issues/123 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.


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.