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

I am having problems downloading www::Mechanize. I downloaded the module into C:\perl\Lib from the following link http://search.cpan.org/~petdance/WWW-Mechanize-1.52/lib/WWW/Mechanize.pm and extracted the files using 7-zip when I run my perl script that uses Mechanize i get the following error message Can't locate WWW/Mechanize.pm in @INC <@INC contains:C:/Perl/site/lib.... I am using active state perl on windows. Can anyone tell me the steps on how to download it I will appreciae it. thanks

Replies are listed 'Best First'.
Re: problems downloading Mechanize
by Corion (Patriarch) on Nov 26, 2008 at 14:34 UTC

    That's not how you install modules into Perl. It may work, but as it doesn't work for you, see Yes, even you can use CPAN. WWW::Mechanize has some prerequisite modules that you will also need to install manually if you choose to go that route. Also, you didn't tell us where exactly you extracted the files to. It seems you didn't extract them into a directory listed in @INC. On my system, Perl looks like this:

    Q:\>perl -le "print for @INC" Q:/Corion/perl-5.8.8/perl/lib Q:/Corion/perl-5.8.8/perl/site/lib .

    and WWW/Mechanize.pm lives in the following directory:

    Q:\>dir Q:\Corion\perl-5.8.8\perl\site\lib\WWW\Mechanize.pm Datenträger in Laufwerk Q: ist XXX$ Volumeseriennummer: 0502-27E2 Verzeichnis von Q:\Corion\perl-5.8.8\perl\site\lib\WWW 25.05.2007 03:32 70.958 Mechanize.pm 1 Datei(en) 70.958 Bytes 0 Verzeichnis(se), 128.371.900.416 Bytes frei Q:\>
Re: problems downloading Mechanize
by marto (Cardinal) on Nov 26, 2008 at 14:31 UTC

    If you are using ActiveState Perl try the following from the command line:

    ppm install WWW::Mechanize

    See Installing Modules from the tutorials section of this site.

    Upadte: Updated ppm install example. Also for future reference you may want to look at PPM::Repositories

    Hope this helps

    Martin

Re: problems downloading Mechanize
by kayj (Novice) on Nov 26, 2008 at 14:54 UTC
    I have tried ppm install WWW::Mechanize form the command line and I am getting the following error message when i run my script . here is the error message "missing base argumnet at C:/Perl/lib/HTTP/Response.pm line 93"