Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't create an instance of WWW:Mechanize::Firefox

I've just installed WWW:Mechanize::Firefox, but when I tried to create an instance of this "class":

    my $mech = WWW::Mechanize::Firefox->new();

I get this error:

Failed to connect to , problem connecting to "localhost", port 4242: 
No connection could be made because the target machine 
actively refused it. 
at C:/strawberry/perl/site/lib/MozRepl/Client.pm line 144

Can anyone help please?

like image 980
eliane Avatar asked Jan 18 '23 17:01

eliane


2 Answers

You must install mozrepl and start it in the menu Tools → MozRepl → Start.

like image 62
daxim Avatar answered Jan 28 '23 11:01

daxim


In addition to installing and starting firefox/mozrepl, an actively refused connection is frequently the work of a FIREWALL, so you need to learn to work your local firewall to allow mozrepl to listen for connections from localhost

like image 30
asdf60q Avatar answered Jan 28 '23 10:01

asdf60q