Clone or Install the Perl modules from one machine to another

Developers or system integrators install lot of Perl modules on their machines when they wanted to try with some applications or modules or APIs. But when they wanted to use the same installed modules to some other servers/machines they need to do the same exercise again on the other machines.

CPAN shell has an inbuilt feature to deal with this scenario.


perl -MCPAN -e "autobundle"

This will create a bundle file which will contain all installed modules available in the path of @INC

<user_home_directory>/.cpan/Bundle/Snapshot_2015_04_16_01.pm

Now copy that bundle file to any machine and run the below command to get all those modules available in the old machine.


perl -MCPAN -e 'install Bundle::Snapshot_2015_04_16_01'