Skip Menu |
 

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

Report information
The Basics
Id: 84256
Status: resolved
Worked: 4 min
Priority: 0/
Queue: Data-Schema

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc: demerphq [...] gmail.com
AdminCc:

Bug Information
Severity: Important
Broken in: 0.135
Fixed in: (no value)



CC: demerphq [...] gmail.com
Subject: Bleadperl v5.17.9-201-g3078e10 breaks SHARYANTO/Data-Schema-0.135.tar.gz
Download (untitled) / with headers
text/plain 343b
As per subject. Canonical ticket for the issue is https://rt.perl.org/rt3//Public/Bug/Display.html?id=117313 Hash randomization is involved. Since the cited commit we seem to have *only* fails on Data-Schema-0.135, not just random ones. Sample fail report: http://www.cpantesters.org/cpan/report/a533357e-90f4-11e2-aa31-fa243b384401 HTH,
CC: Perl5 Porteros <perl5-porters [...] perl.org>
Subject: Re: [rt.cpan.org #84256] Bleadperl v5.17.9-201-g3078e10 breaks SHARYANTO/Data-Schema-0.135.tar.gz
Date: Thu, 28 Mar 2013 14:03:53 +0100
To: bug-Data-Schema [...] rt.cpan.org
From: demerphq <demerphq [...] gmail.com>
Download (untitled) / with headers
text/plain 1.3k
On 28 March 2013 13:33, Andreas Koenig via RT <bug-Data-Schema@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84256 > > > As per subject. Canonical ticket for the issue is https://rt.perl.org/rt3//Public/Bug/Display.html?id=117313 > > Hash randomization is involved. > > Since the cited commit we seem to have *only* fails on Data-Schema-0.135, not just random ones. > > Sample fail report: > > http://www.cpantesters.org/cpan/report/a533357e-90f4-11e2-aa31-fa243b384401 > > HTH,
The module says: NOTE: THIS MODULE IS DEPRECATED AND WILL NOT BE DEVELOPED FURTHER. PLEASE SEE Data::Sah INSTEAD. And the code failing is this: sub _schema2csubname { my ($self, $schema) = @_; # avoid warning from Storable when trying to freeze coderef local $self->config->{gettext_function} = ($self->config->{gettext_function} // "").""; my $n1 = defined($schema) ? (ref($schema) ? md5_hex(freeze($schema)) : $schema) : ""; my $n2 = md5_hex(freeze($self->config)); "__cs_${n1}_$n2"; } I'd say this code only worked by chance anyway. The whole idea of using Storable::freeze() as the basis of deduping things seems to me to be fraught with error. The solution would be to use something like Data::Dumper instead, with Sortkeys enabled. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"
Download (untitled) / with headers
text/plain 500b
Author here. On Thu Mar 28 09:04:03 2013, demerphq@gmail.com wrote: Show quoted text
> I'd say this code only worked by chance anyway. The whole idea of > using Storable::freeze() as the basis of deduping things seems to me > to be fraught with error.
Not really. Storable is just Yet Another serialization. It seems that all I have to do is set $Storable::canonical to 1 to let Storable sort hash keys. Show quoted text
> The solution would be to use something like > Data::Dumper instead, with Sortkeys enabled.
Regards, Steven
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #84256] Bleadperl v5.17.9-201-g3078e10 breaks SHARYANTO/Data-Schema-0.135.tar.gz
Date: Fri, 29 Mar 2013 17:56:45 +0100
To: bug-Data-Schema [...] rt.cpan.org
From: demerphq <demerphq [...] gmail.com>
Download (untitled) / with headers
text/plain 836b
On 29 March 2013 17:53, steven haryanto via RT <bug-Data-Schema@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84256 > > > Author here. > > On Thu Mar 28 09:04:03 2013, demerphq@gmail.com wrote:
>> I'd say this code only worked by chance anyway. The whole idea of >> using Storable::freeze() as the basis of deduping things seems to me >> to be fraught with error.
> > Not really. Storable is just Yet Another serialization. It seems that all I have to do is set $Storable::canonical to 1 to let Storable sort hash keys.
I had forgotten that Storable offered that feature, sorry. Be aware however it modifies the data structure it is serializing (it stringifies all SV's in the structure). Anyway, afaik, if you turn that on Data::Schema should pass. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"
OK, I'm releasing 0.136 to CPAN now with $Storable::canonical=1. Thanks, Steven


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.