ZZamboni has asked for the wisdom of the Perl Monks concerning the following question:
I use the PERL5LIB environment variable to specify additional module directories to search (and I gave my reasons here).
My problem is that now I am starting to play with perl 5.6.0, so a lot of my existing modules need to be recompiled. Since the standard installation procedure creates version-specific directories under the PREFIX you specify, I thought it would be a simple matter of installing the new 5.6.0 modules under the same hierarchy and perl would find them automatically depending on which version I was running.
Wrong. See, my PERL5LIB variable used to contain:
Where "/p/perl" is my directory for "local modules, installed without root privileges"./p/perl/lib:/p/perl/lib/site_perl/5.005:/p/perl/lib/site_perl/5.005/su +n4-solaris: /p/perl/lib/sun4-solaris
When I install some modules with 5.6.0, using the same PREFIX of "/p/perl", it correctly creates /p/perl/lib/site_perl/5.6.0, etc. However, my PERL5LIB does not work, because it explicitly mentions the 5.005 directories. I tried shortening it to:
Hoping that perl would automatically search the version- and architecture-specific directories, but it does not work. It doesn't find a lot of my modules./p/perl/lib:/p/perl/lib/site_perl:/p/perl/lib/sun4-solaris
From the perlrun man page:
PERL5LIB A colon-separated list of directories in which
to look for Perl library files before looking in
the standard library and the current directory.
Any architecture-specific directories under the
specified locations are automatically included
if they exist.
But it doesn't mention anything about version-specific directories.Any ideas? What I would like to do is able to run both versions of perl (5.005 and 5.6.0) with the same PERL5LIB settings, and have it automatically search the correct directories. I do not want to have to include "use lib" statements in my scripts (part of what I am doing is precisely checking whether any of my existing scripts break under 5.6.0).
Thanks a lot!
--Diego
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: How to automatically search version- and architecture-specific module directories
by Anonymous Monk on May 08, 2000 at 22:51 UTC | |
by ZZamboni (Curate) on May 08, 2000 at 23:49 UTC |