Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It is possible, but not comfortable. If this is a single-user setup, you might be better off not using <code>local::lib</code> and just letting perlbrew manage the modules for you. Also if it's a multi-user setup on a homogenous network, where everyone has the same machine and OS, then you can just set <code>PERLBREW_ROOT</code> to e.g. <code>/net/share/perlbrew</code> and then your installed perls (and their modules) can be shared. As noted in the other answers, this will be a problem if you try to mix machines (and possibly also problematic if you have different operating systems).</p> <p>On a very diverse network, we prefer to keep everything separate. You can simply setup your <code>local::lib</code> to be a function of your current perl and your current platform, e.g.</p> <pre><code>distro=lsb_release -d|cut -f2|tr ' ' '-' arch=`uname -m` platform="$distro-$arch" export PERLBREW_ROOT=/net/share/perlbrew/$platform # You will have to first do 'perlbrew init' (just once for all users) # In this case you don't need (and shouldn't have) a ~/.perlbrew source $PERLBREW_ROOT/etc/bashrc perl5base=/net/share/perl # When $PERLBREW_PERL is not defined, local::lib puts modules in $perl5base/$platform perl5=$perl5base/$platform/$PERLBREW_PERL # We also found that we needed to clean PERL5LIB in between export PERL5LIB=`echo -n $PERL5LIB|sed "s|${perl5base}[^:]*||g"` export PATH=`echo -n $PATH|sed "s|${perl5base}[^:]*||g"` # Setup local lib, relative to the perl being used lib=$perl5/lib/perl5 mkdir -p $lib eval $(perl -I"$lib" -Mlocal::lib="$perl5") </code></pre> <p>This is not our exact script, in particular you would need to check that these directories all exist first. You need to run perlbrew init once per platform and you need to bootstrap local::lib each time as well.</p> <p>I don't recommend this approach, but provide as an example of one way to make this work, which it does for our mixed network (even on Mac OS). Leaving local::lib out and just using perlbrew (ignoring the system perl), would be a cleaner approach.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload