Skip to content

Instantly share code, notes, and snippets.

@j1n3l0
Last active November 16, 2018 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j1n3l0/c8c93a7d7ee227cf5c040f87fc720351 to your computer and use it in GitHub Desktop.
Save j1n3l0/c8c93a7d7ee227cf5c040f87fc720351 to your computer and use it in GitHub Desktop.
use perl ${PERL_VERSION}
eval $(perl -Mlocal::lib="${HOME}/.plenv/libs/${PERL_VERSION}@${LIB_NAME}")

create the lib

plenv use "$PERL_VERSION"
plenv lib create "$LIB_NAME"

use the lib

plenv use $PERL_VERSION@$LIB_NAME

note

this should set $PERL5LIB but for some reason it does not:

echo $PERL5LIB #=>

it does however install modules where expected with cpanm that are only visible when the lib is in use.

also you must have local::lib installed for the lib stuff to work.

update

actually it does. you just need to exit the shell first:

echo $PERL5LIB #=> $HOME/.plenv/libs/$PERL_VERSION@$LIB_NAME/lib/perl5

todo

get this to work with cpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment