Installing the module is easy:
1. Download the distribution 2. Unpack it 3. Start a shell in the distribution directory
4a. With a recent version of the cpan tool, run cpan . there.
4b. Alternatively run the following commands: perl Makefile.PL make make test make install
If you notice that tests get skipped and/or the module installs but "does not seem to work", there are some more steps required to configure Firefox:
1. Install mozrepl from
http://wiki.github.com/bard/mozrepl/ A direct link is http://repo.hyperstruct.net/mozrepl/1.0/mozrepl.xpi
2. Launch Firefox
3. Start mozrepl in Firefox by going to the menu: "Tools" -> "MozRepl" -> "Start" You may want to tick the "Activate on startup" item.
If tests still fail, especially t/50-click.t and 51-mech-submit.t , this might be because you use the NoScript Mozilla extension and have it blocking Javascript for file:// URLs. While this is good, the tests need Javascript enabled.
Solution: 1. Open t/50-click.html in Firefox 2. Allow Javascript for all file:// URLs 3. Re-run tests 4. No test should fail
To install WWW::Mechanize::Firefox, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Mechanize::Firefox
CPAN shell
perl -MCPAN -e shell install WWW::Mechanize::Firefox
For more information on module installation, please visit the detailed CPAN module installation guide.