如何修复 Net::Amazon::MechanicalTurk 失败的测试?
我在 Debian Linux 上使用 Perl 5.10.0(测试)并尝试安装 Perl 模块 Net::Amazon::MechanicalTurk 版本 1.01。 当我运行模块的测试套件时,出现如下错误:
t/01-ListOperations.......................Can't locate object method "new" via package "Net::Amazon::MechanicalTurk::Transport::RESTTransport" at /home/user/.cpan/build/Net-Amazon-MechanicalTurk-1.01-BO885C/blib/lib/Net/Amazon/MechanicalTurk/Transport.pm line 21. dubious [...] Failed 21/33 test scripts. 12/78 subtests failed. Files=33, Tests=78, 46 wallclock secs ( 1.50 cusr + 0.22 csys = 1.72 CPU) Failed 21/33 test programs. 12/78 subtests failed.
Net::Amazon::MechanicalTurk::Transport::RESTTransport
ISA Net::Amazon::MechanicalTurk::Transport
其中 ISA Net::Amazon::MechanicalTurk::BaseObject
具有子“new”。
我已安装所有必需的模块,并通过 mturk_install.pl
脚本进行验证。 我已经检查了模块的 CPAN 页面上的问题,但这些错误尚未得到解决。
有没有人遇到过这些问题并提出解决方案? 如果您成功使用此模块,您正在运行哪个版本的 Perl?
I'm using Perl 5.10.0 on Debian Linux (testing) and trying to install the Perl module Net::Amazon::MechanicalTurk version 1.01. When I run the module's test suite, I get errors such as the following:
t/01-ListOperations.......................Can't locate object method "new" via package "Net::Amazon::MechanicalTurk::Transport::RESTTransport" at /home/user/.cpan/build/Net-Amazon-MechanicalTurk-1.01-BO885C/blib/lib/Net/Amazon/MechanicalTurk/Transport.pm line 21. dubious [...] Failed 21/33 test scripts. 12/78 subtests failed. Files=33, Tests=78, 46 wallclock secs ( 1.50 cusr + 0.22 csys = 1.72 CPU) Failed 21/33 test programs. 12/78 subtests failed.
Net::Amazon::MechanicalTurk::Transport::RESTTransport
ISA Net::Amazon::MechanicalTurk::Transport
which ISA Net::Amazon::MechanicalTurk::BaseObject
which has a sub "new".
I have all of the required modules installed, as verified by the mturk_install.pl
script. I've checked the issues on the module's CPAN page, but these errors are not addressed.
Has anyone had these problems and come up with any solutions? If you're successfully using this module, which version of Perl are you running?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
CPAN 测试人员也有类似的经历。
http://www.nntp.perl。 org/group/perl.cpan.testers/2009/03/msg3437850.html
The CPAN Testers had a similar experience.
http://www.nntp.perl.org/group/perl.cpan.testers/2009/03/msg3437850.html
您应该向 CPAN bugtracker 的 Net:: 队列提交错误报告亚马逊::MechanicalTurk
You should submit a bug report to CPAN bugtracker's queue for Net::Amazon::MechanicalTurk
我构建了一个小补丁来帮助解决这个问题。 库的内部逻辑存在错误,导致所有模块无法正确加载。 请访问 http:// 查看补丁和我的说明daveviner.blogspot.com/2009/12/amazon-mechanical-turk-perl-library.html
I've build a small patch that helps solve this problem. There's an error in the internal logic of the library which prevented all the modules from loading properly. Check out the patch and my description at http://daveviner.blogspot.com/2009/12/amazon-mechanical-turk-perl-library.html
我已经应用了 Dave Viner 的补丁和 RT 队列中的两个补丁。 我的 CPAN 目录中存在版本 1.01_01 的未经授权的版本。 我将检查 CPAN 测试人员的响应以获取修复,并在之后发布正式版本。 如果您是原作者,请联系我。
I've applied Dave Viner's patch and two of the patches in the RT queue. There's an unauthorized release with version 1.01_01 in my CPAN directory. I'll check the CPAN Testers response for the fixes and work on an official release after that. If you're the original author, please contact me.
我知道这是旧帖子,但即使在新的 1.02 版本中它仍然是一个问题。 修复起来很容易 - 只需从 lib/Net/Amazon/MechanicalTurk/ModuleUtil.pm 第 35 行删除“已定义”即可。 显然亚马逊的每个人都运行旧版本的 Perl。
I know this is old post, but even in new 1.02 version it is still an issue. It is easy to fix tho - just remove "defined" from line 35 of lib/Net/Amazon/MechanicalTurk/ModuleUtil.pm and you are done. Apparently everybody at Amazon run old version of Perl.
根据 CPAN 测试人员的说法,最新版本的 Perl 与 Net::Amazon::MechanicalTurk 配合使用 是 5.8.9。 我构建了一个本地副本以与该特定模块一起使用。
According to CPAN Testers, the latest version of Perl which worked with Net::Amazon::MechanicalTurk was 5.8.9. I built a local copy for use with this specific module.