I su'd as root onto my server and installed the following:

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();

Any idea why this is happening? Is there a module that I'm missing?

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


In reply to Can't locate object error by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.