4

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?

Eugene Yarmash
  • 142,882
  • 41
  • 325
  • 378
eliane
  • 95
  • 1
  • 7

2 Answers2

7

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

daxim
  • 39,270
  • 4
  • 65
  • 132
  • How do I find Tools->MozRepl in firefox? Searched the whole layout, nothing – Grigor Jun 30 '12 at 18:49
  • 2
    @Grigor: Right click any toolbar in the new firefox(not a tab): and click menu bar to view the menu bar. The menu bar then appears then it is tools->mozrepl->Start – tread Mar 01 '13 at 12:58
2

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

asdf60q
  • 21
  • 1