Jeradian has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks! I'm trying to automate the process of opening up Firefox, navigating to a webpage, logging in, and editing a wiki. I've managed to have the process work perfectly on one computer, but can’t seem to get it to work on two others.

#!C:\Perl64\bin -w use strict; use diagnostics; use WWW::Mechanize::Firefox; use WWW::Mechanize; use MozRepl::RemoteObject; use LWP::UserAgent; my $email = ‘[user]’; my $password = ‘[password]’; ###Open Firefox and navigate to medusa### my $mech = WWW::Mechanize::Firefox->new(launch => 'C:\Program Files (x +86)\Mozilla Firefox\firefox.exe', activate => 1, autoclose => 0); $mech->autodie(0); $mech->allow( javascript => 1); $mech->get(‘[URL]’); my $genmech = WWW::Mechanize->new(); ###Enter email and password### $mech->submit_form( with_fields => { email => $email, password => $password, } );

This gets me the error

 “Failed to connect to , Can’t locate object method “__load_plugins” via package “MozRepl” at C:/Perl/site/lib/MozRepl.pm line 308”

I tried uninstalling and reinstalling MozRepl, but the test fails, giving me this:

“Failed during this command: ZIGOROU/MozRepl-0.06.tar.gz : make_test NO”

Any ideas what the problem could be?

Replies are listed 'Best First'.
Re: Can't locate object method "__Load_plugins" via MozRepl
by mtmcc (Hermit) on Jul 20, 2013 at 06:28 UTC
    Have you looked into these suggestions already?

      It looks as if everything is installed. In Perl/site/lib/MozRepl/Plugin, there exists Base, JSON and JSON2. Is there supposed to be anything else?

      I'm honestly not sure what else that thread is trying to say (I'm pretty new to all this Perl business). Please don't judge me too harshly.

        So in lieu of the fact that I had seemingly tried everything to get this package to install correctly (there seemed to be others that were having a difficult time installing as well), I just took the easy way out and copied the entire perl64 folder from the computer with which I initially constructed the code and replaced the folder on the new computers.

        The good news is it now works. The bad news is I have no idea how to properly fix this issue in the future.

Re: Can't locate object method "__Load_plugins" via MozRepl
by toomas (Initiate) on Oct 29, 2016 at 11:55 UTC