Skip Menu |

This queue is for tickets about the Data-Serializer CPAN distribution.

Report information
The Basics
Id: 131597
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Data-Serializer

People
Owner: neil [...] neely.cx
Requestors: SREZIC [...] cpan.org
Cc: cpan [...] tinita.de
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.60
Fixed in: 0.61



CC: cpan [...] tinita.de
Subject: Test suite fails (with YAML 1.30?)
The test suite started to fail: ... Can't call method "package_test" on unblessed reference at ./t/serializer-testlib line 426. t/01-06-YAML.t ................ Dubious, test returned 255 (wstat 65280, 0xff00) Failed 2/16 subtests ... Can't call method "package_test" on unblessed reference at ./t/serializer-testlib line 426. t/02-01-Orig-Raw.t ............ Dubious, test returned 255 (wstat 65280, 0xff00) Failed 90/224 subtests ... (etc) ... It seems that this happens if YAML 1.30 is installed, possibly because of this change: https://metacpan.org/source/TINITA/YAML-1.30/Changes#L2
RT-Send-CC: cpan [...] tinita.de
On 2020-01-29 09:15:37, SREZIC wrote: Show quoted text
> The test suite started to fail: > > ... > Can't call method "package_test" on unblessed reference at > ./t/serializer-testlib line 426. > t/01-06-YAML.t ................ > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 2/16 subtests > ... > Can't call method "package_test" on unblessed reference at > ./t/serializer-testlib line 426. > t/02-01-Orig-Raw.t ............ > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 90/224 subtests > ... (etc) ... > > It seems that this happens if YAML 1.30 is installed, possibly because > of this change: https://metacpan.org/source/TINITA/YAML- > 1.30/Changes#L2
YAML::Syck has a similar change, so 01-11-YAML-Syck.t may also fail if the newest YAML::Syck is installed: ... Can't call method "package_test" on unblessed reference at ./t/serializer-testlib line 426. t/01-11-YAML-Syck.t ........... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 8/16 subtests ...
I wrote an email to the author, asking if they plan to make a release, or if they would be willing to give the module to someone else.
I attached a patch
Subject: load-blessed.patch
diff --git a/lib/Data/Serializer/YAML.pm b/lib/Data/Serializer/YAML.pm index 0b17ec3..7e5ee98 100644 --- a/lib/Data/Serializer/YAML.pm +++ b/lib/Data/Serializer/YAML.pm @@ -13,6 +13,7 @@ sub serialize { } sub deserialize { + local $YAML::LoadBlessed = 1; return Load($_[1]); } diff --git a/lib/Data/Serializer/YAML/Syck.pm b/lib/Data/Serializer/YAML/Syck.pm index 13f92df..11cf6d1 100644 --- a/lib/Data/Serializer/YAML/Syck.pm +++ b/lib/Data/Serializer/YAML/Syck.pm @@ -13,6 +13,7 @@ sub serialize { } sub deserialize { + local $YAML::Syck::LoadBlessed = 1; return YAML::Syck::Load($_[1]); }
I've just pushed up version 0.61 that intentionally disables LoadBlessed for both YAML and YAML::Syck, and disables the object tests in the test harness.
On Fri Jan 31 00:17:43 2020, NEELY wrote: Show quoted text
> I've just pushed up version 0.61 that intentionally disables > LoadBlessed for both YAML and YAML::Syck, and disables the object > tests in the test harness.
Thanks Neil for the quick response and release!