Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I install stuff locally (not as root) with CPAN, it ends up putting things in a multitude of places. So much so, that I have to set PERL5LIB to five directories!

Here's the CPAN settings where I tell it where to install to:

  'makepl_arg' => q[PREFIX=/home/user],
  'mbuildpl_arg' => q[--install_base /home/user],

Here's what I have to set PERL5LIB to:

/home/user/lib/perl:/home/user/lib/perl5:/home/user/lib/perl/5.10:/home/user/share/perl:/home/user/share/perl/5.10

There must be a cleaner way... I could symlink them all to the same place, but that just seems wrong.

This is on a debian lenny system running perl from debian squeeze.

share|improve this question

Either local::lib or Perlbrew (or both) should be able to simplify things for you. Even more importantly, don't use CPAN to install modules; use cpanm.

My preference is simply to use Perlbrew to install non-system Perl interpreters in my $HOME directory. After that, each interpreter is self-contained and cpanm takes care of modules. Honestly, I never need to think about where modules end up. It just works.

share|improve this answer
    
I'll take a look at those, but I don't want to install a perl interpreter, as /home is on a networked file system (with a quota), and for performance reasons, I'd like to use as much from /usr as I can. – Jayen Nov 13 '11 at 5:59
    
@Jayen With a set-up like that, I understand not wanting to install a new Perl interpreter. local::lib and cpanm should be able to simplify your modules, though, even without Perlbrew. – Telemachus Nov 13 '11 at 14:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .