til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

Use cpanm with CPAN::Mini

If you want install from your local CPAN::Mini mirror:

$ cpanm --from $HOME/minicpan Distribution::To::Install

If you want install from your local CPAN::Mini mirror and if this fail, installation continues as always:

$ cpanm --mirror $HOME/minicpan

You can specify your above choice more permanently using an environment variable:

export PERL_CPANM_OPT="--mirror $HOME/.minicpan --mirror-only"

Source: StackOverflow