четверг, 30 октября 2014 г.

Copying perl modules from one server to another

I had to deploy whole infrastructure on new server and I had to install all perl modules as it was on my dev server.
To do this, we need to generate list of all installed modules.
perl -MCPAN -eautobundle
This finds all installed modules and their distribution name, then stored these information in a snapshot file. When this is finished, the final messages shows
Wrote bundle file
now, copy this file into new server under /root/.cpan/Bundle/Snapshot_2014_10_30_00.pm
then just run
perl -MCPAN -e 'install Bundle::Snapshot_2014_10_30_00'
this will install all modules from this snapshot