3

So we are migrating servers. Arghh. There is a lot of Perl stuff on one machine that we need to set up on another one.

Is there a way to export / import a list of all packages that are installed so that I can install them on the new server instead of looking up one by one? (using ActivePerl)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sam
  • 946
  • 3
  • 11
  • 22

2 Answers2

5

If you are using ppm, you can use ppm profile commands. You can store a list of installed packages via

ppm profile save my_modules.xml

and restore on another machine with

ppm profile restore my_modules.xml
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
bvr
  • 9,687
  • 22
  • 28
3
cpan -a

will create a Bundle of all your installed packages, which can be moved to your CPAN directory on the other system and installed there.

I did this once, a few years ago, and it seemed to work then.

reinierpost
  • 8,425
  • 1
  • 38
  • 70
  • Thanks! now i have a bundle. Any idea how to install it now? (we are running Windows Server on the system) – Sam Feb 04 '12 at 19:27
  • I think it's the same location that you `cpan` put it in (but on the other system). Details are hard to provide because they may depend on whose Perl distribution (ActivePerl, Strawberry Perl, Cygwin, etc.) you run and I hardly ever use anything but Cygwin myself. – reinierpost Feb 04 '12 at 20:54
  • Then `ppm` is the first thing to try - as you've acknowledged already. – reinierpost Feb 06 '12 at 08:48
  • Does CPAN really work in ActivePerl (no C compiler available)? Don't they have their own package system ([PPM](https://en.wikipedia.org/wiki/Perl_package_manager))? From *[Perl package manager](https://en.wikipedia.org/wiki/Perl_package_manager)*: *"PPM is widespread on Microsoft Windows systems, which often lack the C and C++ compilers necessary to build some Perl modules."* – Peter Mortensen Dec 06 '19 at 10:51
  • I suppose CPAN doesn't work well in ActivePerl - I've never really used ActivePerl so I don't really know. – reinierpost Dec 06 '19 at 10:54