rak has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I'm putting together an install script for our Linux machines, and I want the user to need to interact with the install as little as possible.

One part of this install is a bundle of Perl modules. Previously, we have done this by defining a bundle and doing a force install of the bundle in CPAN. However sometimes it takes 2 attempts to get all the dependencies resolved, and some modules require user input as part of the CPAN install.

Are there any disadvantages to replacing /usr/lib/perl5 with a zipped install of the modules instead of using CPAN in this instance? (The Redhat and Perl versions will be the same across machines, and ideally the Perl modules should all be the same versions, which this method provides ensures).

Thanks in advance for your advice!

  • Comment on Best way to package perl modules for deployment

Replies are listed 'Best First'.
Re: Best way to package perl modules for deployment
by zby (Vicar) on Apr 28, 2003 at 15:39 UTC
    There is the PAR module for packing modules together.
Re: Best way to package perl modules for deployment
by perrin (Chancellor) on Apr 28, 2003 at 15:46 UTC
    If they are Red Hat systems, you should consider making RPMs. It's easy and works well. In general though, you can just move modules around with tar as long as the machine you're moving them to is set up the same. If you're confused about what goes where, you can install them in a private directory, move that whole directory with tar (or zip or whatever), and add it to @INC on the target machines.
      Thanks for everyone's help, I'll be taking the tar approach initially, and then moving towards using an RPM as soon as possible.
Re: Best way to package perl modules for deployment
by nite_man (Deacon) on Apr 29, 2003 at 07:12 UTC
    I think that using RPM is a good way because it let you have a control over version of software, create an interactive installer and keep your software more well-ordered. Try to use this manual for creation your RPM.
    Hope that it will be usefull for you.
          
    --------------------------------
    SV* sv_bless(SV* sv, HV* stash);
    

      For Debian systems, there's the most excellent dh-make-perl. It downloads the modules from CPAN, builds them and packages them into nice .deb files. I think there must be some similar tool for RH or Mandrake as well, but I can't remember the name

      --bwana147