Installing perl module

Hi,

I want to install WWW:Mechanize module.

Followed the following steps:

  1. wget http://www.cpan.org/authors/id/C/CO/CORION/Bundle-
    WWW-Mechanize-Shell-0.29.tar.gz

perl Makefile.PL
make
make test
make install (Got the below message)
Appending installation info to /usr/local/lib/perl5/5.10.1/i686-linux/perllocal.prod

I thought every thing sucessful. But when I do perl -MWWW::Mechanize -e1 and
getting "cant locate WWW/Mechanize.pm in @INC"

Module is stored at "/root/package/module".

So wrote small script to check whether WWW::Mechanize module is indentified by perl or not.

#!/usr/bin/perl

use lib "/root/package/module";
use WWW::Mechanize;

print "\@INC is @INC\n";

Again getting "cant locate WWW/Mechanize.pm in @INC".

What to do, so that perl recognize the WWW/Mechanize.pm?

Please help me out....

Thanks

There are 2 things one usually does before installing a Perl module from source:

  1. Check if it's available through the vendor.
  2. Use the cpan utility to install the module.

To install WWW::Mechanize through CPAN type

cpan -i WWW::Mechanize

This will download the module, check the pre-requisites, compile (if necessary), and install in the appropriate location.