4

I've tried to install the WWW::Mechanize module with

'cpan WWW::Mechanize'

I get no errors on the 'use WWW::Mechanize' line which means its finding the files, but upon trying to instantiate it with:

$m = WWW::Mechanize->new();

I get the following problem:

Can't locate HTTP/Config.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0/darwin- thread-multi-2level /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at /Library/Perl/5.10.0/LWP/UserAgent.pm line 746.

I'm not exactly sure what is going on. I feel like I have all the neccessary dependencies, but I can't seem to find what this particular error means.

My script is empty besides the previously mentioned lines and

use strict;
use warnings;

Has anyone run into this?

Arjun Nayini
  • 191
  • 1
  • 2
  • 5
  • 1
    "Can't locate HTTP/Config.pm" - looks like a missing dep to me... – Mat Apr 17 '11 at 00:23
  • 2
    It means that you do NOT have all of the necessary dependencies :-) You are missing the HTTP::Config module. – tadmc Apr 17 '11 at 00:23
  • @tadmc Thanks so much. I thought cpanm got all the necessary dependencies, but maybe something went wrong. A quick run of 'cpan HTTP::Config' got everything up and running. Just checked my tables and the POST went through! – Arjun Nayini Apr 17 '11 at 00:35

1 Answers1

7

try installing it with the following command (from the shell):

perl -MCPAN -e 'install WWW::Mechanize'

follow the installation process, and answer 'Y' where needed.

snoofkin
  • 8,725
  • 14
  • 49
  • 86