There is only one truth. It is the source.

Installing Perl packages offline

December 24, 2014

Tags: perl

Use cpanm which has a standalone executable capable of installing Perl packages from a local file. See http://search.cpan.org/~miyagawa/App-cpanminus-1.7022/lib/App/cpanminus.pm#Downloading_the_standalone_executable.

First download cpanm:

wget https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm

Run it on a Perl tar package:

perl cpanm TAP-Parser-SourceHandler-pgTAP-3.30.tar.gz

It will install to ~/perl5/. So in this example I can run:

~/perl5/bin/pg_prove