Skip Menu |
 

This queue is for tickets about the CHI CPAN distribution.

Report information
The Basics
Id: 74188
Status: resolved
Priority: 0/
Queue: CHI

People
Owner: Nobody in particular
Requestors: jfuller [...] mvpbanking.com
Cc:
AdminCc:

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



Subject: CHI::Serializer::Storable Does Not Support Cross Architecture By Default
Date: Fri, 20 Jan 2012 14:41:45 -0500
To: bugs-chi [...] rt.cpan.org
From: Jeffrey Fuller <jfuller [...] mvpbanking.com>
Download (untitled) / with headers
text/plain 922b
The default serializer, Storable uses freeze/thaw for serialization. However, this does not when a cache is being used across multiple architectures. Thus, when windows machines with 32bit perl were sharing a cache with linux machines running 64bit perl a "Byte order is not compatible" error is thrown. The recommended solution is to user network order to serialize the data. *** Storable.pm 2012-01-20 14:37:18.668378773 -0500 --- Storable.pm 2012-01-20 14:37:30.416378119 -0500 *************** *** 13,23 **** __PACKAGE__->meta->make_immutable; sub serialize { ! return Storable::freeze( $_[1] ); } sub deserialize { ! return Storable::thaw( $_[1] ); } sub serializer { --- 13,23 ---- __PACKAGE__->meta->make_immutable; sub serialize { ! return Storable::nstore( $_[1] ); } sub deserialize { ! return Storable::retrieve( $_[1] ); } sub serializer {
Download Storable.patch
text/x-diff 532b

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #74188] CHI::Serializer::Storable Does Not Support Cross Architecture By Default
Date: Tue, 31 Jan 2012 12:23:09 -0800
To: bug-CHI [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
Download (untitled) / with headers
text/plain 2.1k
Ugh, that was silly of me. I would like to fix this; unfortunately if I do, when people upgrade CHI their existing caches may break. On Jan 20, 2012, at 11:41 AM, Jeffrey Fuller via RT wrote: Show quoted text
> Fri Jan 20 14:41:54 2012: Request 74188 was acted upon. > Transaction: Ticket created by jfuller@mvpbanking.com > Queue: CHI > Subject: CHI::Serializer::Storable Does Not Support Cross Architecture By Default > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: jfuller@mvpbanking.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74188 > > > > The default serializer, Storable uses freeze/thaw for serialization. > However, this does not when a cache is being used across multiple > architectures. Thus, when windows machines with 32bit perl were sharing > a cache with linux machines running 64bit perl a "Byte order is not > compatible" error is thrown. > > The recommended solution is to user network order to serialize the data. > > > *** Storable.pm 2012-01-20 14:37:18.668378773 -0500 > --- Storable.pm 2012-01-20 14:37:30.416378119 -0500 > *************** > *** 13,23 **** > __PACKAGE__->meta->make_immutable; > > sub serialize { > ! return Storable::freeze( $_[1] ); > } > > sub deserialize { > ! return Storable::thaw( $_[1] ); > } > > sub serializer { > --- 13,23 ---- > __PACKAGE__->meta->make_immutable; > > sub serialize { > ! return Storable::nstore( $_[1] ); > } > > sub deserialize { > ! return Storable::retrieve( $_[1] ); > } > > sub serializer { > > *** Storable.pm 2012-01-20 14:37:18.668378773 -0500 > --- Storable.pm 2012-01-20 14:37:30.416378119 -0500 > *************** > *** 13,23 **** > __PACKAGE__->meta->make_immutable; > > sub serialize { > ! return Storable::freeze( $_[1] ); > } > > sub deserialize { > ! return Storable::thaw( $_[1] ); > } > > sub serializer { > --- 13,23 ---- > __PACKAGE__->meta->make_immutable; > > sub serialize { > ! return Storable::nstore( $_[1] ); > } > > sub deserialize { > ! return Storable::retrieve( $_[1] ); > } > > sub serializer {
Download (untitled) / with headers
text/plain 255b
The patch given is wrong - store/retrieve are for saving to and retrieving from disk. It should be as simple as changing freeze to nfreeze. There shouldn't be any concern with upgrading, as thaw will handle both network and native formats without issue.
Download (untitled) / with headers
text/plain 369b
D'oh, you're right! I'll put this in the next release. On Mon Feb 25 09:01:44 2013, haarg wrote: Show quoted text
> The patch given is wrong - store/retrieve are for saving to and > retrieving from disk. > > It should be as simple as changing freeze to nfreeze. > > There shouldn't be any concern with upgrading, as thaw will handle both > network and native formats without issue.


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.