The every day things from Thalamus' life.

Thalamus' Blog

9 January, 2016

CPAN::Mini to the rescue

Filed under: ComputerStuff_en — Thalamus @ 16:40

No Internet and need a lot of CPAN modules ? Get CPAN::Mini and transport it by a usb stick or something.

$ cpanm CPAN::Mini

create your own CPAN mirror – first create .minicpanrc

local: /path/to/usbdrive/cpan_mini/
remote: http://cpan.uib.no/
also_mirror: indices/ls-lR.gz

Now, run

$ minicpan

And wait a good while for the mirror to be fully populated.
Now, on the machine without Internet, tell cpanm to use the mirror.
Let’s install the Data::Printer module as an example.

$ cpanm -mirror ~/path/to/usbdrive/cpan_mini --mirror-only Data::Printer

Easy, and awsome at the same time.

• • •