It's cold outside -- Bundle::up! =pod =for advent_year 2008 =for advent_day 10 =for advent_title Brrrr — Better Bundle::up! =for advent_author David Westbrook & Jerrad Pierce Going home for the holidays and installing C on that basement computer? Well, whether you're heading up North or way down South, be sure to A up! Both major "package managers", CPAN and A<../../2002/18th/|CPANPLUS>, support the C convention which allows you to fill an order based on a shopping list of your favorite, or absolutely necessary, modules. Simply create a module in the C name-space with a special C<=CONTENTS> pod section (lines 9-19), listing each module to install on its own line. Lines can optionally specify the version of the mod with optional I versionN<1> (line 11), or comment following a dash (lines 13-17). Save it to a file in the C<@INC> search path, or specified by C<-Mlib=>N<2> and C will work its magic and install all of the desired modules when we "install" this one. Note that if our bundle were on CPAN, instead of created locally, it gets installed locally too. The fact that Bundles aren't discarded as mere metafiles allows for some minimal versioning of bundles, and other parlor tricks. For instance, if you create your A<../1/|ToolSet> as a C, the POD provides documentation of its purpose, while providing a simple means of assembling your I. Unsure what modules to include in a C? If you use one of the perl package managers listed, try C for a list of distributions installed in F. If you have too many "favorite" modules to list, and would prefer to "replicate"N<1> environment? Use C or C to "autobundle"; the latter resulted in a null file for the author though. Be warned: both commands are slow, especially CPAN, however with it not only do you get a complete inventory, you also get information about the availability of newer and shinier versions. Either way, you can now take your F with you and have all the comforts of your C<$HOME $ENV> at your fingertips! =begin pre Package namespace installed latest in CPAN file Algorithm::C3 0.07 0.07 BLBLACK/Algorithm-C3-0.07.tar.gz Algorithm::Diff 1.1902 1.1902 TYEMQ/Algorithm-Diff-1.1902.tar.gz AnyData 0.10 0.10 JZUCKER/AnyData-0.10.tar.gz … vmsish 1.02 1.02 RGARCIA/perl-5.10.0.tar.gz warnings 1.05 1.06 RGARCIA/perl-5.10.0.tar.gz Wrote bundle file /home/me/.cpan/Bundle/Snapshot_2008_12_10_00.pm =end pre =sourcedcode mod10.pm 1. Alas, CPAN doesn't install the specified verison of a module, so it is not possible to exactly replicate an environment bug-for-bug/feature-for-feature with Cs. 2. Inclusion of a trailing slash is important e.g; C<-Mlib=./> and not C<-Mlib=.> =cut Another example of bundling, spawned as a result of this article, is M, which provides a bundle for each year of the Perl Advent Calendar (or all-in-one). =pod =begin eds 2008-12-12: M has been created to facilitate the hypothetical use of Bundles with ToolSet mentioned above. =end eds