Unable to create WWW instance: Mechanize :: Firefox

I just installed WWW:Mechanize::Firefox , but when I tried to instantiate 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?

+4
source share
2 answers

You must install mozrepl and run it in the menu Tools โ†’ MozRepl โ†’ Start .

+7
source

In addition to installing and running firefox / mozrepl, the connection is actively refused, FIREWALL often works, so you need to learn how to work with the local firewall so that mozrepl can listen to connections from localhost

+2
source

All Articles