如何使用 32 位 Perl 解冻使用 64 位 Storable 冻结的内容?
我正在尝试解冻在 64 位 Solaris(生产)计算机上使用 Storable 冻结的数据库 BLOB。当我尝试在 32 位 Windows(开发)PC 上解冻时,我收到“字节顺序不兼容错误”。
perl -v (on solaris)
This is perl, v5.8.8 built for i86pc-solaris-64
perl -v (on Windows)
This is perl, v5.10.1 built for MSWin32-x86-multi-thread
确切的错误是:
(Unable to read: Byte order is not compatible at blib\lib\Storable.pm (autosplit into blib\lib\auto\Storable\thaw.al) line 415, at ../handlers/Search/actions/SearchSendQueue.pm line 124 )
SearchSendQueue.pm的第124行:
my $object = thaw( $item->{object} );
有人知道如何在32位机器上解冻这个对象吗?
注意:该对象在 64 位生产机器上有效且工作。 我已经尝试过“$Storable::interwork_56_64bit = 1;”正如其他论坛上的建议。
I'm trying to thaw a database BLOB that was frozen using Storable on a 64-bit Solaris (production) machine. When I try to thaw on a 32-bit Windows (development) PC I receive "Byte order is not compatible error".
perl -v (on solaris)
This is perl, v5.8.8 built for i86pc-solaris-64
perl -v (on Windows)
This is perl, v5.10.1 built for MSWin32-x86-multi-thread
Exact error is:
(Unable to read: Byte order is not compatible at blib\lib\Storable.pm (autosplit into blib\lib\auto\Storable\thaw.al) line 415, at ../handlers/Search/actions/SearchSendQueue.pm line 124 )
line 124 of SearchSendQueue.pm:
my $object = thaw( $item->{object} );
Does anybody know how I can thaw this object on the 32-bit machine?
Note: The object is valid and working on the 64 bit production machine.
I've already tried "$Storable::interwork_56_64bit = 1;" as suggested on other forums.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可存储文档说:
在同一节中,他们建议 Storable 的基本用途是本地且快速的持久化方法。但是,您可以使用
nstore
以网络字节顺序存储持久结构。结果将是它的读取和存储速度较慢,但可以在所有平台上运行。因此建议您必须使用 64 位计算机使用
nstore
按网络顺序读取和重新存储数据。Storable documentation says:
In the same section, they suggest that the basic use of Storable is a local and FAST persistence method. However, you can use
nstore
to store the persisted structure in network byte order. The result will be that it reads and stores slower but works across all platforms.So the suggestion is that you'll have to use the 64-bit machine to read and re-store the data in network order using
nstore
.我知道文档表明它应该是可能的,但除了在 64 位计算机上使用 nfreeze/nstore* 之外,我一直无法让它工作。
I know the docs indicate it's supposed to be possible, but I've never been able to get it to work except by using nfreeze/nstore* on the the 64-bit machine.