Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

[solved] WWW::Mechanize::Firefox stops after $mech->get()

by ground0 (Novice)
on Feb 22, 2013 at 20:18 UTC ( #1020220=perlquestion: print w/ replies, xml ) Need Help??
ground0 has asked for the wisdom of the Perl Monks concerning the following question:

Is it possible doing a CPAN upgrade broke my WWW::Mechanize::Firefox module? My actual Perl program runs, but after $mech->get() it stops doing anything. I wrote this barebones script to test since I hadn't committed any changes to my previously working Perl program.
use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new( create => 1, bufsize => 10_00 +0_000, autoclose => 1, events => ['DOMContentLoaded', 'DOMFrameConten +tLoaded'] ); $mech->get('http://google.com'); print 'yay';
This opens google.com then does not print 'yay'.

Comment on [solved] WWW::Mechanize::Firefox stops after $mech->get()
Download Code
Re: WWW::Mechanize::Firefox stops after $mech->get()
by Corion (Pope) on Feb 22, 2013 at 20:20 UTC

    You don't tell us what version you upgraded from and to.

    If you review the Changes file, there were heavy changes in v0.69, which now relies heavily on a set of events, and your code eliminates two of the three required events. I would assume that that is part of the problem.

      Corion, beautiful! I have indeed upgraded from I *believe* 0.68 to 0.71. So I am sure this is my issue. I will try making the appropriate changes on my dev box and test again. Stupid is as stupid does (blindly typing upgrade into CPAN console).

        Corion I just wanted to thank you one more time! I removed the extraneous constructor 'events' params, and my program is running once again.

        I really appreciate your immediate response, and I'm so thankful it was something simple... I'm using Parallel::ForkManager to handle multiple Firefox tabs at the same time, and I wrapped all of the WWW::Mechanize::Firefox methods inside try{} so I potentially had a HUGE problem on my hands!

        Simply removing the 'events' params with a s///g in vi fixed my code for v0.71, and I wrote a huge note to upgrade CPAN stuffs individually (and not run upgrade sans options) :)

        -gz

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1020220]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-09-18 07:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (109 votes), past polls