Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: perl modules replication

by brian_d_foy (Abbot)
on Sep 13, 2007 at 20:30 UTC ( [id://638900]=note: print w/replies, xml ) Need Help??


in reply to perl modules replication

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.

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://638900]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found