in reply to Maintaining a Perl Installation

Sounds like you have a lot of poor planning from the previous support person to amend. (doesn't seem wise to keep custom scripts under the perl directory)

Figure out all the non-core modules you need by parsing all your scripts, who cares what .pm files are actually installed..you just care about the ones being used. Then download the .ppd and .tar.gz files for each module from the appropriate site(s).

After that write a script to automate the installation of all those modules. You'll need to modify the path within the .ppd file to match that of the locally installed/copied .tar.gz files.

ActivePerl is pretty simple to install silently, check the docs for exact syntax/options. In the environment I work we use SMS(ugh), so I have an SMS issuance that installs perl itself and then runs my script to install the extra modules. I do something like this to install Perl itself:

msiexec.exe /I blah.msi TARGETDIR=D:\PERL AddPerlToPath=NO /q
and my install script for the modules that runs after perl itself is installed is like this :
use PPM; .... # array of fully qualified path to each .ppd file for ( @modules_to_install ) { print "Attempting to install $_\n"; if( PPM::InstallPackage("package" => $_) ) { print "Successfully installed $_\n"; } else { print "Failed to install $_\n"; $errors++; } }

Note: I wrote my automated module install script before ppm3 came about, so there may be newer ways/abilities to do this. After thousands of successful installs it has worked very well. If the server was healthy enough for Perl itself to install from the .msi file then the module install script always ran successfully for me.

Replies are listed 'Best First'.
Re: Re: Maintaining a Perl Installation
by PodMaster (Abbot) on May 07, 2003 at 08:16 UTC
    ppm3 is the name of the new console.
    PPM.pm has not changed that much (a few bugfixes, some additions, but pretty much the same -- PPM::InstallPackage is there)

    I for one dislike how ActivePerl handles the PPM distribution (no test suite is not good), but it's their product, so I can't do much about it (the last cpan release is PPM-2.1.6).


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
    ** The Third rule of perl club is a statement of fact: pod is sexy.