1. Build & Install
For example we are going to install Template Perl module under directory ~/tools/perlmodule
- Download Template-Toolkit-2.24.tar.gz
- Unzip Template-Toolkit-2.24
- perl Makefile.PL PREFIX=~/tools/perlmodule
- make
- make test
- make install
2. How to use
In order to use Template module, you must have following 2 statements in your perl file (.pl):
- use lib '~/tools/perlmodule/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi';
- # the path where Template.pm can be found
- use Template;
- # to search Template.pm file
Or you can use environment variable PERL5LIB to set the module search path.
- export PERL5LIB=~/tools/perlmodule/lib64/perl5/site_perl/5.8.8