14.5. Installing modules on Unix manually with root rights

  • Download the tar.gz file from search.cpan or other site (wget URL)

  • Linux: tar xzf distribution.tar.gz

  • UNIX: gunzip distribution.tar.gz

  • UNIX: tar xf distribution.tar

  • perl Makefile.PL

  • make

  • make test

  • make install (as root)

Without root rights

 
perl Makefile.PL PREFIX=/home/foobar/perlib LIB=/home/foobar/perlib/lib

In the code:

use lib '/home/foobar/perlib/lib';
use My::Module;

Module::Build
perl Build.PL --install_base /home/foobar/perl5lib --install_path lib=/home/foobar/perl5lib/lib
./Build
./Build test
./Build install


If you are interested in on-site trainings by the author, please contact me directly.

Online courses:

Would you like to get
updated when I publish
the next article?

Follow me:

Google Plus Twitter RSS feed