use lib '/usr/home/username/perl5/lib/perl5/';
use CGI::Ajax;
####
To begin using the CPAN interactive tool, log into your account and use
the following command:
/usr/bin/perl -MCPAN -e shell
This will display the CPAN shell prompt:
cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support enabled
cpan>
By default, CPAN installs modules in a central location where customers
don't have write access. Here is the command to configure CPAN to install
modules in your home directory instead:
o conf makepl_arg LIB=DIRECTORY_NAME
Substitute DIRECTORY_NAME with the directory where you'd like to install
the Perl module. For example, if user 'example' wanted to install a
library in his 'Lib' directory, it would look like this:
cpan> o conf makepl_arg LIB=/usr/home/example/Lib
makepl_arg LIB=/usr/home/example/Lib
cpan>
All you need to do now is tell CPAN to install the modules you're
interested in. For example, if you wanted to install the Acme::Yoda module
(to convert your website into Yoda-speak):
cpan> install Acme::Yoda
Running install for module Acme::Yoda
You will see a lot of information as the CPAN program installs the perl
library for you. You may also see warnings that you don't have permission
to install the module's man pages; this is normal. Hopefully, you should
eventually see something like:
/usr/bin/make install -- OK
At this point, your Perl module is installed in your directory and ready
for use. Use the "q" command to quit from the CPAN shell.
Any script which will use the newly installed module must be told where it
is installed, like this:
use lib '/usr/home/example/Lib'; # The same as your LIB= configuration
use Acme::Yoda;
##
##
use lib '/usr/home/username/perl5/lib/perl5/';