ch0wned. adj. This is the state when you are a Linux user and don't have root access.
This tutorial is for people wanting to install perl modules using CPAN who do not have root access or wish to keep a network-central module repository that is separated from the local install.
- Unpackage lib::local
tar xvfz local-lib-1.008004.tar.gz
- Choose a library directory
I use a value of $HOME which installs the modules into $HOME/lib/perl5
- Install lib::local into the above spot
cd lib-local-1.008004 perl Makefile.PL --bootstrap=$HOME make make install
eval `perl -I$HOME/lib/perl5 -Mlocal::lib=$HOME` perl -I$HOME/lib/perl5 -Mlocal::lib=$HOME -MCPAN -e shell cpan> install Awesome::Module::From::CPAN
Now you can install modules from CPAN as normal as shown above. You might want to put the first two lines into a shell script named “my_cpan” or something.
Specifying your library path in your Perl scripts
use lib '/home/you/lib/perl5';
use lib '/home/you/lib/perl5'; use Awesome::Module::From::CPAN;