Re: What does MakeFile do?

[email protected] (Lewis Kirk) Tue, 20 Jan 2009 19:22:34 -0500
Newsgroups perl.beginners.cgi
Message-ID <p06240801c59c147e4d7e@[192.168.1.97]>
At 5:58 AM -0800 1/19/09, dirk van der Giesen wrote:
>If you run perl Makefile.pl it actually installes the module (.pm) file.
>This usually is in the usr/bin/ directory or somewhere similar and on a host it means you must have permissions to do so.
>The most easy way is to ask your host to install the module for you, but there is also something else you can try yourself
>(from http://search.cpan.org/dist/perl/pod/perlmodinstall.pod):
>
>-- but you can install modules into any directory you wish.
>For instance,
>where I say perl Makefile.PL,
>you can substitute perl Makefile.PL PREFIX=/my/perl_directory to install the modules into /my/perl_directory.
>Then you can use the modules from your Perl programs with use lib "/my/perl_directory/lib/site_perl"; or sometimes just use "/my/perl_directory";.
>If you're on a system that requires superuser/root access to install modules into the directories you see when you type perl -e "print qq(@INC)",
>you'll want to install them into a local directory (such as your home directory) and use this approach.
>

So if I use MakeFile to install the modules locally on my McOSX machine, I should be able to ftp the result to the correct folder (ie cgi-bin or cgi or wherever) on my remotely hosted web site and be able to use it by calling "use foo::bar;" in my main perl file as long as they are located in the same folder. Or would I need to include "use lib '.';" to establish the path?

BTW, the module I am trying to install is reCAPTCHA.pl which has two dependencies: LWP::UserAgent and HTML::Tiny. I am trying to implement a captcha using NMS Formmail and http://recaptcha.net/, but my question about MakeFile has been bugging me for sometime.
-- 
Lewis Kirk
www.dmzgraphics.com
803-787-3450