http://www.perlmonks.org?node_id=1020220

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'.

Replies are listed 'Best First'.
Re: WWW::Mechanize::Firefox stops after $mech->get()
by Corion (Patriarch) 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