in reply to Installation of perl module in some local directory and using it
Typically, you install a Perl module from source using something like this:
In your case, you would modify the make install line with an installation path -- you could put it under /root, but under /opt might be more appropriate. No, I don't know what environment variable is appropriate -- you might have to update the Makefile to accomplish this. It's open source -- help yourself.tar zxf Digest-SHA1-2.13.tar.gz cd Digest-SHA1-2.13 perl Makefile.PL make make test make install
Then, in order to use this module, installed in a non-standard location, you would just add a use lib line in your code:
and call the module's methods. You probably don't want to mess around setting PERLLIB, as show in your example... use lib '/path/to/your/installation'; use Digest::SHA1;
Above all, it helps to understand the steps that you're taking when installing a module -- this isn't black magic, it's actually quite simple.
|
|---|