Install Perl module in your home directory
Date : February 25, 2014
To install a Perl module in your home directory is helpful for a couple of reasons. 1) It doesn’t require root permission. 2) It’s installed separately from the site-wide installed modules, hence can coexist with those modules and useful when trying a module that has different version with what’s already installed.
$ perl -MCPAN -e shell PREFIX=~/lib/perl LIB=~/lib/perl
cpan> install
cpan> quit
Assuming that you want it installed on the directory lib/perl on your home directory. Also, don’t forget to set PERL5LIB:
export PERL5LIB=~/lib/perl:$PERL5LIB
Tags:
Perl
your nerd is showing 😛