Skip to content

Instantly share code, notes, and snippets.

@pmakholm
Created July 7, 2009 18:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pmakholm/142267 to your computer and use it in GitHub Desktop.
Handle multiple Perl local::lib paths
# Defaults:
PERL_LOCAL_LIB="home"
DIR=$HOME/.perl
if [ -n "$1" ]; then
PERL_LOCAL_LIB=$1
fi
export PERL_LOCAL_LIB
case $PERL_LOCAL_LIB in
alpha)
DIR=$HOME/projects/alpha/ ;;
mercury)
DIR=$HOME/subversion/mercury/perl ;;
tmp)
mkdir -p /tmp/makholm/perl
DIR=/tmp/makholm/perl ;;
esac
eval $( perl -Mlocal::lib=$DIR )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment