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

若如初见. 提交于 2019-11-27 08:00:53

问题


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?


回答1:


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




回答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



来源:https://stackoverflow.com/questions/7417904/cant-create-an-instance-of-wwwmechanizefirefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!