Skip to content

Instantly share code, notes, and snippets.

@preaction
Created May 29, 2012 20:01
Show Gist options
  • Select an option

  • Save preaction/2830370 to your computer and use it in GitHub Desktop.

Select an option

Save preaction/2830370 to your computer and use it in GitHub Desktop.
Update perl5lib with all lib/blib dirs in a directory
# Set the right PERL5LIB
for LIBDIR in $HOME/git/*; do
if [[ -e $LIBDIR/blib/lib ]]; then
PERL5LIB=$LIBDIR/blib/lib:$LIBDIR/blib/arch:$PERL5LIB
fi
# lib dir outranks blib dir, though this might cause problems with XS modules
if [[ -e $LIBDIR/lib ]]; then
PERL5LIB=$LIBDIR/lib:$PERL5LIB
fi
done
export PERL5LIB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment