Special_K has asked for the wisdom of the Perl Monks concerning the following question:
I just installed
WWW::Mechanize::Firefoxbut cannot even get it to complete this simple script:
#!/usr/bin/perl -w use strict; use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new(activate => 1); $mech->get("http://www.google.com"); printf("title: %s\n", $mech->title()); $mech->document(); $mech->content();
When I run it, I get the following response:
> www_mech_firefox_test.pl command timed-out at /home/user1/perl5/lib/perl5/MozRepl/Client.pm lin +e 186
Here is what I have verified so far:
1. mozrepl is installed and started within Firefox
2. port 4242 TCP/UDP is forwarded to my PC through my router
3. I can run "telnet localhost 4242" and get a MozRepl prompt
What else could be causing this problem?
EDIT: This is under cygwin, if it makes any difference.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: can't get www::mechanize::firefox to work
by Khen1950fx (Canon) on Apr 13, 2013 at 05:42 UTC | |
| [reply] |
by Special_K (Pilgrim) on Apr 13, 2013 at 18:02 UTC | |
I installed www::mechanize::firefox through CPAN. Isn't it supposed to handle all dependencies automatically? | [reply] |
by Khen1950fx (Canon) on Apr 13, 2013 at 23:35 UTC | |
| [reply] |
|
Re: can't get www::mechanize::firefox to work
by Anonymous Monk on Apr 13, 2013 at 06:35 UTC | |
What else could be causing this problem? Did you run the test suite successfully? | [reply] |
by Special_K (Pilgrim) on Apr 13, 2013 at 20:02 UTC | |
UPDATE: Apparently none of the tests ran successfully. I walked away from my computer while the install was running and when I came back I only looked at the bottom line that said Result: PASS.
Given the above, it appears my perl script is never connecting to mozrepl. As I said previously, I have verified that mozrepl is running and can connect to it using "telnet localhost 4242". | [reply] [d/l] |
by Special_K (Pilgrim) on Apr 13, 2013 at 18:01 UTC | |
I installed www::mechanize::firefox through CPAN, which should automatically run the tests, correct? Based on my admittedly limited experience using CPAN, it won't by default install any module that fails its built in tests. | [reply] |
|
Re: can't get www::mechanize::firefox to work
by Corion (Patriarch) on Apr 13, 2013 at 18:26 UTC | |
| [reply] |
by Special_K (Pilgrim) on Apr 13, 2013 at 19:16 UTC | |
I added
but that didn't change anything. | [reply] [d/l] |
by Corion (Patriarch) on Apr 13, 2013 at 20:08 UTC | |
That's weird. From the test scripts all skipping, it seems that telnet can connect. So I suggest you consult with your system administrator as to why that would be while Firefox cannot connect from the same machine. | [reply] [d/l] |
by Special_K (Pilgrim) on Apr 13, 2013 at 20:28 UTC | |
by Corion (Patriarch) on Apr 13, 2013 at 20:33 UTC | |
| |