Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
HTTP::Cookies (was already up to date)
WWW::Mechanize
WWW::Mechanize::Frames
LWP::Simple
I have a program that uses all three of them.
Here's the thing - on my personal server, my program works perfectly. It logs into a site for me, fills out a form and then submits it.
At work, where I am right now, I have the same program, but when I run it I get the error:
'Can't locate object method "form" via package "WWW::Mechanize::Frames" at myprogram.pl line 41.'
Here is some of the code from the program. Line 41 is commented below:
my $m = WWW::Mechanize::Frames->new( autocheck=>1); $m->get("http://www.mysite.com/"); my $html = $m->content; $html =~ s[</body>][$form_data]g; $m->update_html($html); $m->form('LoginForm'); ## Line 41 $m->field('login','xxxxxxxx'); $m->field('password','xxxxxx'); $m->click();
My personal server has perl v5.8.8 built for i686-linux. My job/work server has perl v5.8.6 built for x86_64-linux-thread-multi
I need this program to run on my server at work, not my personal one and I know the program is fine since I've tested and debugged on my personal server. Please reply to this thread if you are able to help me solve this problem.
Thank you in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't locate object error
by Corion (Patriarch) on May 21, 2008 at 15:20 UTC | |
by Anonymous Monk on May 21, 2008 at 16:10 UTC | |
by Anonymous Monk on May 22, 2008 at 04:44 UTC | |
by Anonymous Monk on May 21, 2008 at 15:47 UTC | |
by mandarin (Hermit) on May 21, 2008 at 16:55 UTC |