saintmike has asked for the wisdom of the Perl Monks concerning the following question:
If I want to install a CPAN module in a location that doesn't interfere with my package manager, I typically use
and then useperl Makefile.PL INSTALLBASE=/home/me/perl-lib
to run scripts using that new hierarchy of perl libs.PERL5LIB=/home/me/perl-lib/lib/perl5 perl-script
However, instead of using an ENV variable, I'd like to use code like
which, unfortunately, and contrary to the explanation in perlrun, isn't the same. For example, if you have architecture-dependent code that ends up in something like /home/me/perl-lib/lib/perl5/i686-linux-thread-multi, then PERL5LIB set to /home/me/perl-lib/lib/perl5 will find it, while 'use lib' won't.use lib '/home/me/perl-lib/lib/perl5';
Questions:
- What are you doing to keep Perl modules installed by your package manager and CPAN modules separate?
- Is INSTALLBASE still the recommended way of installing modules in a different than the standard location with MakeMaker?
- Is there a directive in Perl that does what PERL5LIB does (without using PERL5LIB)?
Back to
Seekers of Perl Wisdom