0

Can you tell me where to find a guide on how to install a perl module?

I am trying to install the perl module: 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. All I know is that when I run use 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

In the directory in which I have perl, if I type ppm install WWW-Mechanize-Firefox I get

"ppm install filed: Can't find any package that provide WWW-Mechanize-Firefox"

I use Windows XP.

I would appreciate any help. Thank you!

szabgab
  • 6,202
  • 11
  • 50
  • 64
user1690130
  • 500
  • 2
  • 7
  • 26

3 Answers3

3

Based on this error:

Cannot locate www/mechanize/firefox.pmin @INC<@INC contain: 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:

cpan WWW::Mechanize::Firefox

I believe ActiveState supports the above, as well as ppm install WWW::Mechanize::Firefox

EDIT: ActiveState's Instructions

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.

Craig Treptow
  • 834
  • 7
  • 19
  • I am doing that. In the interium, I got a warning telling me to install cpan and then do reload cpan. – user1690130 Feb 05 '13 at 21:24
  • So should I top the currnt install? It is still going. – user1690130 Feb 05 '13 at 21:33
  • how long is the installation supposed to take? It's been going for at least nearly 20 minutes. Am I doing something wrong? – user1690130 Feb 05 '13 at 21:40
  • @user1690130 20 minutes is pretty long. I'd kill it and see if you can get to the cpan prompt ( cpan> ), by just typing `cpan`. – Craig Treptow Feb 05 '13 at 21:47
  • should I do cpan -t WWW::Mechanize::Firefox ? I just did: cpan WWW::Mechanize::Firefox – user1690130 Feb 05 '13 at 21:48
  • I'd first verify that `cpan` doesn't blow up, and if not, try `cpan WWW::Mechanize::Firefox` again. – Craig Treptow Feb 05 '13 at 21:50
  • what do you mean by blow up? How do you verify that? I wasn't at the cpan prompt before. Now I am. Do cpan WWW::Mechanize:Firefox from the directory in which I Have perl? – user1690130 Feb 05 '13 at 21:53
  • I meant it would give some sort of error. If you are at the cpan> prompt you can just do `install WWW::Mechanize::Firefox` – Craig Treptow Feb 05 '13 at 21:56
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/24002/discussion-between-user1690130-and-craig-treptow) – user1690130 Feb 05 '13 at 21:56
  • The Strawberry one failed. Some of the tests failed. Then it ended by sying won't install without force. install failed for `Z/ZI/ZIGOROV/MozRepl-0.06.tar.gz' – user1690130 Feb 05 '13 at 22:38
  • I don't think I have either Strawberry or Active working for mozrepl. How will I know they worked? They are giving me failed error messages. – user1690130 Feb 06 '13 at 16:46
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/24051/discussion-between-craig-treptow-and-user1690130) – Craig Treptow Feb 06 '13 at 17:04
  • I think it worked!! Is running use WWW::Mechanize::Firefox; in perl and getting no response a good sign? – user1690130 Feb 06 '13 at 20:46
2

I've used this in anger only under Linux.

The problem (back then) was that the WWW modules didn't include hard dependencies for the MozRepl modules, hence the manual install.

My own instructions (from about 3 years ago)

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

However, if it worked for Craig then it might be all ok now.

ashley
  • 559
  • 5
  • 13
  • Not all the tests passed for me, but it apparently does install MozRepl and MozRepl::RemoteObject, since I never explicitly installed those. – Craig Treptow Feb 06 '13 at 13:58
0

I have had trouble with IPC-Run in 64-bit Active Perl. ActiveState says it doesn't work. But I find it not necessary for basic uses of 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.

Hope this helps someone! -lta