我怎样才能使用32位Perl来解冻64位Storable冻结的东西?

我怎样才能使用32位Perl来解冻64位Storable冻结的东西?,第1张

概述我正在尝试解冻在64位Solaris(生产)计算机上使用Storable冻结的数据库BLOB.当我尝试在32位 Windows(开发)PC上解冻时,我收到“字节顺序不兼容错误”. perl -v (on solaris)This is perl, v5.8.8 built for i86pc-solaris-64perl -v (on Windows)This is perl, v5.10 我正在尝试解冻在64位Solaris(生产)计算机上使用Storable冻结的数据库BLOB.当我尝试在32位 Windows(开发)PC上解冻时,我收到“字节顺序不兼容错误”.

perl -v (on solaris)This is perl,v5.8.8 built for i86pc-solaris-64perl -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;”正如其他论坛所建议的那样

解决方法 Storable文档说:

Storable writes a file header which contains the sizes of varIoUs C language types for the C compiler that built Storable (when not writing in network order),and will refuse to load files written by a Storable not on the same (or compatible) architecture.

在同一节中,他们认为Storable的基本用法是局部和FAST持久性方法.但是,您可以使用nstore以网络字节顺序存储持久化结构.结果是它读取和存储速度较慢,但​​适用于所有平台.

因此建议您必须使用64位计算机使用nstore以网络顺序读取和重新存储数据.

总结

以上是内存溢出为你收集整理的我怎样才能使用32位Perl来解冻64位Storable冻结的东西?全部内容,希望文章能够帮你解决我怎样才能使用32位Perl来解冻64位Storable冻结的东西?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1269967.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存