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> |
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 {
Message body is not shown because sender requested not to inline it.