Wednesday 26 August 2015

Including perl module from non standard path

  1. Using perl module from standard path:
  2. ----
  3. use Getopt::Std;
  4. ----

  5. Using perl module from non-standard path(eg; from your home directory):
  6. ---- use lib '/home/<username>/perl_modules/DateTime-1.20/lib';
  7. use DateTime;

setenv PERL5LIB /home/rperiset/perl_modules/DateTime-1.20/lib (for tcsh)
export PERL5LIB=/home/rperiset/perl_modules/DateTime-1.20/lib (for bash)
  1. ----
  2. Note: Path should be upto directory where module resides.

No comments:

Post a Comment