20090113 perl autobundle notes - plembo/onemoretech GitHub Wiki

title: Perl Autobundle Notes link: https://onemoretech.wordpress.com/2009/01/13/perl-autobundle-notes/ author: lembobro description: post_id: 402 created: 2009/01/13 14:36:15 created_gmt: 2009/01/13 14:36:15 comment_status: open post_name: perl-autobundle-notes status: publish post_type: post

Perl Autobundle Notes

The autobundle feature in perl can save a lot of time when trying to clone a perl environment on one machine to another. Or not.

Basically what autobundle does is create a .pm file that can be used to install (or reinstall) all modules from CPAN that are in it.

If you use a package based Linux distribution like I do you can also use the list as data for a shell script that calls for the installation of specific packages. Of course you’ll need to do some translation, replacing the perl-style module names with the corresponding package names. While that could take some work, you still have the benefit of reducing the risk of “missing” a necessary package.

To generate the autobundle file you would issue this command:

perl -MCPAN autobundle

This will create the file in your .cpan directory (on my systems I set this to /var/tmp/.cpan), under /Bundle. The file will be called something like Snapshot_2009_01_12_00.pm (substitute creation date for values in this example).

If you were to use autobundle to install the modules on another machine, rather than the system’s native package manager, you’d do a

`perl -MCPAN -e

Copyright 2004-2019 Phil Lembo