Perl Mongers Camel
#Perl
mongers
FAQ / CPAN / Q1
How do I install a Perl module without having root?


Q. How do I install a Perl module without having root?

A. 1 (edit)

When you build modules, use the PREFIX and LIB options when generating Makefiles:
    perl Makefile.PL PREFIX=/mydir/perl LIB=/mydir/perl/lib
    
then either set the PERL5LIB environment variable before you run scripts that use the modules/libraries (see perlrun) or say
    use lib '/mydir/perl/lib';
    
This is almost the same as
    BEGIN {
        unshift(@INC, '/mydir/perl/lib');
    }
    
except that the lib module checks for machine-dependent subdirectories. See Perl's lib for more information.


The use of a camel image in association with Perl is a trademark of O'Reilly & Associates, Inc. Used with permission.