I just wrote about this in The Perl Review. It's not an easy job (yet). The trick is to get the same versions of everything on the second machine, whether or not those versions are still on CPAN. Most tools only installed the latest version, and often that's not what you want.
The sequence goes something like this for the general case where the platforms are not the same (if they are the same, you might (might!) just be able to copy a directory and be done with it):
- Discover all the module versions on the reference machine
- Match those up to distributions on CPAN or BackPAN. That's the hard part because there isn' t anything out there to help you (not yet, working on it). PAUSE has a map of current modules to latest release distros, but doesn't have that information historically.
- Grab those distros and put them into a MiniCPAN using CPAN::Mini::Inject. You might have to remove some newer dists. There's a bit of manual work here (so far). Also inject any local or private modules you want in there.
- Now, install your bundle or Task from your MiniCPAN using the normal installation process.
- Find out what is different between the two installations and adjust the MiniCPAN until they come out the same.
- Once you have the MiniCPAN set up the way you like it, freeze it. Put it on a CD or something. That's your application snapshot from which everyone else will use.
- If you want to update some distros, start over at the point where you add to MiniCPAN.
I have no idea if this will work with ActivePerl or Strawberry Perl. I finally got VMware running and Windows installed, but I haven't tested it yet.
I'll be giving a talk about this at the Los Angeles Perl Mongers in about a week, and soon after that it should be available as a perlcast.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.