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

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: HELP!!! PERL refuses to load Mechanize
by Corion (Patriarch) on Jul 11, 2007 at 17:25 UTC

    It seems you didn't install WWW::Mechanize by using the cpan shell but manually. Also it seems to me as if you manually set your @INC directory to include some weird value:

    /usr/local/lib/perl5/site_perl/5.8.8/WWW

    My guess is that as soon as you change wherever you set that weird value to the below value, it will all work. But you should really, really use the cpan shell to install modules, especially if you are running Cygwin anyway.

    /usr/local/lib/perl5/site_perl/5.8.8
      Damn right. Info for the OP and any other newbie struggling with this: when you do
      use WWW::Mechanize;
      Perl will internally translate this to a request to look in @INC for a subdirectory 'WWW' containing a text file 'Mechanize.pm'.

      So @INC should contain a list of roots of library trees, not a list of directories where the actual module source files are in — except when the module name is a top level name, i.e. it doesn't contain any "::" (or "'").

      A reply falls below the community's threshold of quality. You may see it by logging in.
Re: HELP!!! PERL refuses to load Mechanize
by derby (Abbot) on Jul 11, 2007 at 17:29 UTC

    How the heck did you install WWW::Mechanize? It' looks like a botched install. Admit it ... you just copied it over and manually mucked @INC, didn't you? I see /usr/local/lib/perl5/site_perl/5.8.8/WWW - which is bad. That should be /usr/local/lib/perl5/site_perl/5.8.8. I would recommend that you remove WWW::Mechanize in the reverse order of the botched install and then read over A Guide to Installing Modules.

    -derby
Re: HELP!!! PERL refuses to load Mechanize
by ForgotPasswordAgain (Vicar) on Jul 11, 2007 at 17:39 UTC
    I think you must've manually added /usr/local/lib/perl5/site_perl/5.8.8/WWW to @INC using use lib or passing it as the argument to -I on the command line, right? Try taking out the WWW from the end (or add another use lib without the WWW).
Re: HELP!!! PERL refuses to load Mechanize
by rpanman (Scribe) on Jul 11, 2007 at 17:18 UTC
    Can you please format your question? It is almost impossible to read what the problem is. Can I suggest putting your code/printouts in a code block? Perhaps the Writeup Formatting Tips will help.

    Update:Doesn't make much sense now Corion has fixed the format :-)
    I'll leave the comment here to maintain the link