local install perl package
cpanm -l ~/.local/perl5 Graph::Easy
It's possible to set a default install path, but the -l path
option is fine if
you're not installing a lot of these. Here's info on setting a default if you
need it.
https://stackoverflow.com/questions/41527057/installing-perl-modules-to-a-specific-location
You'll also need to add the relevant paths to your PATH
, MANPATH
and
create PERL_BASE
and PERL5LIB
variables.
export PERL_BASE="$HOME/.local/perl5"
export PERL5LIB="$PERL_BASE/lib/perl5"
export PATH="$HOME/.local/perl5/bin${PATH:+:$PATH}"
export MANPATH="$HOME/.local/perl5/man${MANPATH:+:$MANPATH}"