Sinistral has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, all. I recently found this blog post: http://perl.jonallen.info/writing/articles/install-perl-modules-without-root which mentions a (new to me) module called local::lib. Have any of the monks in the Monastery used this module? I know we have lots of nodes decribing how to do this, but maybe there's now a one stop shopping.

Replies are listed 'Best First'.
Re: Experience with local::lib ?
by ikegami (Patriarch) on Aug 27, 2009 at 16:48 UTC

    Looks like the basic idea is to expand "~" for you while adding to @INC.

    Seems like a rather useless module to me. If you have a library under your home directory, you should simply add it to the PERL5LIB env var. It would only be useful if you have multiple libraries under your home directory. Maybe I'm missing something.

    I don't like the default. perl Makefile.PL INSTALL_BASE=~ makes more sense than perl Makefile.PL INSTALL_BASE=~/perl5, so why does it expect to you do the later when installing modules.

    Update: Oh, it also appears to help installation too by omitting the need to specify INSTALL_BASE=~ when using cpan. Of course, that's a non-issue since you configure cpan to use INSTALL_BASE=~ automatically. It's actually more complicated to use local::lib all the time rather than configuring cpan once.