Created
July 7, 2009 18:29
-
-
Save pmakholm/142267 to your computer and use it in GitHub Desktop.
Handle multiple Perl local::lib paths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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