如何修复 Net::Amazon::MechanicalTurk 失败的测试?

发布于 2024-07-16 17:07:23 字数 1047 浏览 6 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

我的黑色迷你裙 2024-07-23 17:07:23

我构建了一个小补丁来帮助解决这个问题。 库的内部逻辑存在错误,导致所有模块无法正确加载。 请访问 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

剩一世无双 2024-07-23 17:07:23

我已经应用了 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.

方觉久 2024-07-23 17:07:23

我知道这是旧帖子,但即使在新的 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.

谷夏 2024-07-23 17:07:23

根据 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文