简体   繁体   English

如何安装Perl模块WWW-Mechanize-Firefox?

[英]How do I install the Perl module WWW-Mechanize-Firefox?

Can you tell me where to find a guide on how to install a perl module? 您能告诉我在哪里可以找到有关如何安装Perl模块的指南吗?

I am trying to install the perl module: http://metacpan.org/pod/WWW::Mechanize::Firefox::Installation 我正在尝试安装perl模块: http : //metacpan.org/pod/WWW :: Mechanize :: Firefox :: Installation

I am stuck at step 7. I am not sure where the problem lays exactly, although I can get mozrepl to appear under tools. 我陷入了第7步。虽然我可以使mozrepl出现在工具下,但我不确定问题的确切位置。 All I know is that when I run use WWW::Mechanize::Firefox ; 我所知道的是,当我运行时使用WWW :: Mechanize :: Firefox ; I get the following type of result: 我得到以下类型的结果:

Cannot locate www/mechanize/firefox.pmin @INC<@INC contain: C:/Perl/site/lib C:/Perl/lib 找不到www / mechanize / firefox.pmin @INC <@INC包含:C:/ Perl / site / lib C:/ Perl / lib

In the directory in which I have perl, if I type ppm install WWW-Mechanize-Firefox I get 在我拥有perl的目录中,如果我键入ppm,则安装WWW-Mechanize-Firefox

"ppm install filed: Can't find any package that provide WWW-Mechanize-Firefox" “ ppm安装已归档:找不到提供WWW-Mechanize-Firefox的任何软件包”

I use Windows XP. 我使用Windows XP。

I would appreciate any help. 我将不胜感激任何帮助。 Thank you! 谢谢!

Based on this error: 基于此错误:

Cannot locate www/mechanize/firefox.pmin @INC<@INC contain: C:/Perl/site/lib C:/Perl/lib 找不到www / mechanize / firefox.pmin @INC <@INC包含:C:/ Perl / site / lib C:/ Perl / lib

You need to install the module. 您需要安装模块。

If you are using Strawberry Perl for instance, you should be able to simply: 例如,如果您使用Strawberry Perl,则应该能够简单地:

cpan WWW::Mechanize::Firefox

I believe ActiveState supports the above, as well as ppm install WWW::Mechanize::Firefox 我相信ActiveState支持上述内容,以及ppm install WWW::Mechanize::Firefox

EDIT: ActiveState's Instructions 编辑: ActiveState的说明

EDIT: 编辑:

During the install, some of the tests failed. 在安装过程中,某些测试失败。 I then went ahead and followed the steps you linked to. 然后,我继续进行并遵循您链接到的步骤。 At that point I went back and ran the tests using: 那时,我返回并使用以下命令运行测试:

cpan -t WWW::Mechanize::Firefox

The tests open and close various windows in FF. 测试将打开和关闭FF中的各个窗口。

I've used this in anger only under Linux. 我只在Linux下才使用它。

The problem (back then) was that the WWW modules didn't include hard dependencies for the MozRepl modules, hence the manual install. 问题(当时)是WWW模块不包括MozRepl模块的硬依赖性,因此是手动安装。

My own instructions (from about 3 years ago) 我自己的指示(大约3年前)

cpan WWW::Mechanize::Firefox
cpan MozRepl
cpan MozRepl::RemoteObject

However, if it worked for Craig then it might be all ok now. 但是,如果它对Craig有用,那么现在可能还可以。

I have had trouble with IPC-Run in 64-bit Active Perl. 我在64位Active Perl中使用IPC-Run遇到麻烦。 ActiveState says it doesn't work. ActiveState表示它不起作用。 But I find it not necessary for basic uses of WWW::Mechanize::Firefox. 但是我发现WWW :: Mechanize :: Firefox的基本用法没有必要。 If you install App::cpanminus, and in run cpanm -n WWW::Mechanize::Firefox I find that it pushes through the install of IPC-Run and you can go ahead using mechanize firefox in 64-bit windows instantiations. 如果您安装App :: cpanminus,并在运行中运行cpanm -n WWW :: Mechanize :: Firefox,我发现它会推动IPC-Run的安装,您可以继续在64位Windows实例中使用机械化Firefox。

Hope this helps someone! 希望这对某人有帮助! -lta -lta

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM