Perl – Installing PERL CPAN modules in local directory

cpanperl

i have a 1and1 hosting account and would like to install some Perl CPAN modules that are not part of the standard host package. Is it possible to install modules without ROOT access? If so, how do i do that? Thanks for the pointers in advance.

Best Answer

cpanminus is quickly becoming the choice interface for CPAN. It supports installing packages in to the user's home directory.

Its usage is frightening simple. To install the cpanminus package locally:

curl -L http://cpanmin.us | perl - App::cpanminus

To install an arbitrary package:

curl -L http://cpanmin.us | perl - Lingua::Romana::Perligata

Remember to add the user's local library to the PERL5LIB environment variable.

export PERL5LIB=$HOME/perl5/lib/perl5:$PERL5LIB