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

[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(''); print 'yay';
This opens then does not print 'yay'.

Replies are listed 'Best First'.
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) :)


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1020220]
Approved by ww
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2018-06-22 20:59 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.