You have the steps incomplete, though:
I'm keeping the source code to the DBI module in one place (~/src) and the installed version in another (~/myperl). Always a good idea.mkdir ~/src cd ~/src (download DBI-1.blahblah.tar.gz) tar xzf DBI-1.blahblah.tar.gz cd DBI-1.blahblahblah perl Makefile.PL LIB=~/myperl make make test make install
Then put this at the top of your program that uses the DBI module:
and it should load the DBI library from that directory.use lib "/usr/home/sz/myperl"; use DBI;
If you have different versions of Perl all over the place, you might have to say:
To specify which version of Perl the module is being built for. This would be the same version of Perl that you put at the top of your programs:/pkg/perl5/plus/bin/perl Makefile.PL LIB=~/myperl
#!/pkg/perl5plus/bin/perl -wHope this helps you!
Nat
In reply to Re: lib pragma and module installation
by gnat
in thread lib pragma and module installation
by sz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |