无法在@INC中找到POE / Component / Client / HTTP.pm

时间:2015-10-29 13:04:51

标签: perl

我正在尝试运行这个perl Web代理代码link,但我有一个错误,说我缺少HTTP.pm!

消息:

final ScriptEngineManager mgr = new ScriptEngineManager();
ScriptEngine engine = mgr.getEngineByName("JavaScript");
System.out.println("neq: " + engine.eval("a1 = NaN; a1!=a1;"));
System.out.println("eq: " + engine.eval("a1 = NaN; a1==a1;"));
System.out.println();
engine = mgr.getEngineByName("JavaScript");
System.out.println("eq: " + engine.eval("a1 = NaN; a1==a1;"));
System.out.println("neq: " + engine.eval("a1 = NaN; a1!=a1;"));
System.out.println();
engine = mgr.getEngineByName("JavaScript");
engine.eval("a1 = NaN;");
System.out.println("neq: " + engine.eval("a1!=a1;"));
System.out.println("eq: " + engine.eval("a1==a1;"));
System.out.println();
engine = mgr.getEngineByName("JavaScript");
engine.eval("a1 = NaN;");
System.out.println("eq: " + engine.eval("a1==a1;"));
System.out.println("neq: " + engine.eval("a1!=a1;"));

那么,我应该安装什么才能运行此代码。 谢谢,

2 个答案:

答案 0 :(得分:4)

您需要安装Perl模块POE::Component::Client::HTTP。如果您有权访问,请尝试从命令行运行:

perl -MCPAN -e 'install POE::Component::Client::HTTP'

答案 1 :(得分:1)