How do I install the Perl module WWW-Mechanize-Firefox? - perl

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!

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.

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.

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

Related

trouble installing perl module with cpanm

I'm trying to install Vcf.pm from CPAN and am having no luck. Part of the problem is that I can't get cpanm to work.
This is where I started:
https://metacpan.org/pod/release/AJPAGE/Bio-Pipeline-Comparison-1.123050/lib/Vcf.pm
The Install Instructions (at the lower left if that page) gives 2 options:
cpanm Vcf
and
perl -MCPAN -e shell
install Vcf
For the second option, the first line goes okay but the second line returns:
Warning: Cannot install Vcf, don't know what it is.
Trying the first option, I get:
-bash: cpanm: command not found
That is strange, because I already installed cpanminus and it seemed to go okay, and when I give this command:
cpan App:cpanminus
I get this:
App::cpanminus is up to date (1.7044).
Can anyone help me get one of the above 2 options working so I can get the module installed? I'm just a humble dilettante where computer programming is concerned, but my understanding is that cpan is supposed to make installing modules easy, so I can't believe I've managed to fail at this!
It appears that the Bio::Pipeline::Comparison distribution is not indexed by PAUSE, so CPAN does not know how to install it. It's listed on MetaCPAN, but it was released seven years ago. The GitHub repository is missing and it's not in the author's CPAN directory. The module has disappeared. You might write to the author to ask where's it's gone if you are supporting legacy code. If you are doing new work, find something else to do the job.
As for the missing cpanm, it's probably installed but not in your PATH. You can force install it to and see where it ends up:
% cpan -f App::cpan minus

How to install Captcha::reCaptcha module?

I'm trying to use Google's reCaptcha v2 system with a Perl script. I can find information on how to use the modules in places like
Captcha::reCAPTCHA
and
Captcha::reCAPTCHA::V2
but the instructions on how to install the module are confusing.
I have cpan installed but I don't know the proper command to download and install the module. I'm running CentOS 7.
Can anybody walk me through what I need to do to get these libraries on my system?
Are these the same module/library?
installing cpan:
yum install cpan
Looks like this is the command that worked:
cpan Captcha::reCAPTCHA::V2

Problems while installing WWW::Mechanize::Firefox

I am using the windows 8 operating system and I am trying to install the WWW::Mechanize::Firefox module in ActiveState Perl, from CPAN. I have successfully downloaded and installed all the dependencies and also installed the MozRepl module on Firefox. I do not have noScript running on my firefox and hence I am assuming that Javascript is enabled across all files (I am not sure how or where to check that). Here is my error message when I try to install the module.
I also constantly receive this error throughout the installation - "Subroutine-MozRepl-Load Plugins redefined at line 104."
Any help is much appreciated ! Thank you !
EDIT - These are the errors -
As Kim suggested in comments, you will need Mozrepl and Firefox.
Please refer WWW::Mechanize::Firefox::Installation page for detailed instructions on how to install this module.
If you use ActiveStates package manager, you can find some pre-packaged but untested PPMs at https://github.com/Corion/www-mechanize-firefox/downloads .
I needed to use this module on Windows, and couldn't get it running with ActivePerl. So I installed http://strawberryperl.com/ and it worked. This version of perl seems to handle installs form the cpan command line utility better than Activestate, who expect you to use their perl package manager as the default module installer (and don't supply a dmake program). Strawberry Perl also comes with a C compiler so can build modules that are a mixture of Perl and C code.
And make sure mozrepl is running before you try to install.

Unable to install any perl modules because it can't location strict.pm

Hello StackOverflow Community,
I am trying to install a perl module, IO::All. But every time I use CPAN to install many perl modules (including if I run from within cpan "install Build::CPAN") it fails with
Can't locate strict.pm in #INC (#INC contains:
/dev/null/lib/perl5.8-dist/Linux-2.6c2.5-x86_64-64int
/dev/null/lib/perl5.8-dist
/dev/null/lib/perl5.8-dist/Linux-2.6c2.5-x86_64-64int
/dev/null/lib/perl5.8-dist /dev/null/lib/perl5.8-dist .) at Build.PL
line 2.
This has been baffling me for hours. I've googled around and can't seem to find a solution. Running something like
perl -e 'use strict; print "ok"'
Outputs just fine. And the original file I was trying to run, which asks for IO::All uses strict as well. How is strict even missing? Isn't strict part of perl by default? And where is /dev/null? Isn't that a special location where you can pass in stderr/stdout if you don't care about that? I've been pulling my hair out about this for a while. I must be missing something obvious.
This is running on a Rhel5 Virtual Machine Linux-2.6-x86_64 variant.
Your help is much appreciated. Let me know if I need to provide further information.
Thank you,
-Asaf
I have this issue today. I compiled perl 5.14 and install to my home directory ($HOME/perl5.14/).
Because perl5.14 install some minimum perl5 libraries, you have to include the directory into $PERL5LIB=$HOME/perl5.14/usr/local/lib/perl5/5.14.2
Hope this works for you :)
I also suspect that your cpan script is misconfigured. But perl -MCPAN uses the same config, so won't help you.
Installing an alternative CPAN client might help. I'd recommend cpanminus because it's very easy to install. Just run the following command (preferably while logged in as root):
curl -L http://cpanmin.us | perl - App::cpanminus
Now you should have cpanminus, you can use it to install IO::All:
cpanm -S -v IO::All

Dependencies issue in manually installing module with activeperl

ok here is the complete story, i got referenced into this site :
https://github.com/Kimtaro/jisho.org ,
The source is great, i just want to test to get it runs offline in my local server with XAMPP
Where my details are as follows :
Windows 7 32 bit ultimate, XAMPP v1.7.2 , ActivePerl 5.16.3 Build 1603
i got the compressed files and tried to install it manually with
perl makefile.pl
then here comes the problem :
Can't locate inc/Module/Install.pm in #INC (#INC contains: C:/Perl/site/lib C:/Perl/lib .) at makefile.pl line 1. BEGIN failed--compilation aborted at makefile.pl line 1.
I haven't tried the strawberry Perl , but my question is , "Is this the dependecy problem ?" since i tried to look and i haven't found that install.pm in the perl directory.
i've been struggling to find the solution anywhere, even if there's a tiny bit of clue to solve it, i'd greatly appreciate it.
"Is this the dependecy problem"
Yes, usually.
If you had deployed this module from a built version, that you found on CPAN, inc::Module::Install would have been bundled with that module in its inc/ directory.
However, because you're using the source checkout, you need to have the pre-requisites locally.
Recommending course of action: Install cpanm, and then install Module::Install
Installing cpanm is the hard part, not sure how you do that on Win32.
However, once you have, installing Module::Install is easy:
cpanm Module::Install
On active Perl, you could probably use CPAN.pm that comes with it, but I'm out of touch how that works and cpanm is a valuable investment.
But basically, yes, you have a dependency problem.
And you need to solve that somehow to proceed.
However, exactly how to solve that depends on your system.