我一直在尝试通过 CPAN 安装 WWW::Mechanize::Firefox,但在安装依赖项 MozRepl 时遇到问题。安装通过,但测试都失败了,当我强制安装它并运行我的 perl 脚本时,我遇到了一个错误
Failed to connect to , at /Library/Perl/5.12/MozRepl/RemoteObject.pm line 467.
所以我卸载了 MozRepl 并查看了我在日志中得到以下错误的测试:
# Failed test at t/10-plugin-repl-enter.t line 11.
Can't locate object method "repl_enter" via package "MozRepl" at t/10-plugin-repl-enter.t line 12.
...
# Failed test at t/20-plugin-json.t line 16.
Can't locate object method "json" via package "MozRepl" at t/20-plugin-json.t line 17.
# Failed test at t/19-plugin-repl-util-doc_for.t line 14.
Can't locate object method "repl_doc_for" via package "MozRepl" at t/19-plugin-repl-util-doc_for.t line 16.
# Failed test at t/18-plugin-repl-util-help_url_for.t line 14.
Can't locate object method "repl_help_url" via package "MozRepl" at t/18-plugin-repl-util-help_url_for.t line 16.
ETC..
我在 Mac OSX 10.8.4、4 GB Ram 2.5 Ghz、Perl 版本 5.12 上运行。有谁知道是什么导致了这些错误?
更新:我重新安装了 mozrepl,现在运行脚本时出现此错误:
Failed to connect to , problem connecting to "localhost", port 4242: Connection refused at /Users/thui/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/MozRepl/Client.pm line 144