http://www.perlmonks.org?node_id=948249

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

I have a bunch of darkpan modules that I've been maintaining for years, built around ExtUtils::MakeMaker ... but some have configuration files, some are CGIs that need images/javascript/css, and I really hate just inserting stuff into the Makefile via MY::postamble.

The last time something similar was asked on here was 2007. I did a quick search on CPAN, and found Module::CGI::Install and App::Build, built around Module::Install and Module::Build respectively. But neither one of them seems to have any uptake as best I can tell (using Google codesearch).

My other thought was to insert a script for the person to to run after the module's installed, and that script would download the necessary files and put them in the right place. (downloading as I can't be sure where the module's tarball might be) ... but that seems a little iffy, as you don't have a chance to review what's getting inserted ... and for the ones with config files, they actually need the files to run their tests.

Are there other alternatives that I've managed to overlook? Or if other people are using App::Build or Module::CGI::Install (other than the authors), could you comment on your experience with it?

Replies are listed 'Best First'.
Re: Installers that handle more than just modules and scripts?
by ikegami (Patriarch) on Jan 17, 2012 at 05:52 UTC

    I don't know if it suits your needs, but one can use File::ShareDir to access files installed into per-distro and per-module directories such as using Module::Build's share_dir directive. (The other installers have the means of installing here too.) This is really only good for read-only files, and if you don't need the files to be in a specific directory.

Re: Installers that handle more than just modules and scripts?
by Arunbear (Prior) on Jan 17, 2012 at 11:17 UTC
    I've used App::Build for some work projects (with a use case quite similar to yours). It was easy to use and effective.
Re: Installers that handle more than just modules and scripts?
by pklausner (Scribe) on Jan 17, 2012 at 10:27 UTC
    Yes, this looks like an OS installer job. Unfortunately there are plenty of them. One good work-around is the Easy Package Manager. From one meta package description - which actually is mostly a RPM specfile - you can generate most Unix package formats plus one generic installer. The more similar you keep the target installations, the easier is your meta package.
Re: Installers that handle more than just modules and scripts?
by Anonymous Monk on Jan 17, 2012 at 05:55 UTC
Re: Installers that handle more than just modules and scripts?
by JavaFan (Canon) on Jan 17, 2012 at 10:05 UTC
    Maybe you're using the wrong tool? Seems like you want to reinvent what your OS native package manager is already doing. Why not reuse what's already there?

      I would if I were running it in a homogeneous environment, but it's being distributed to 4 sites now, running a mix of MacOS, Solaris and two linux flavors. I'm in the process of updating my installers because we're looking to add another 3-5 sites into the mix.

        Quoting rpm5.org:
        Traditionally, RPM is a core component of many Linux distributions, including Red Hat Enterprise Linux, Fedora, Novell SUSE Linux Enterprise, openSUSE, CentOS, Mandriva Linux, and many others. But RPM is also used for software packaging on many other Unix operating systems like FreeBSD, Sun OpenSolaris, IBM AIX and Apple Mac OS X through the cross-platform Unix software distribution OpenPKG. Additionally, the RPM archive format is an official part of the Linux Standard Base (LSB).
        Quoting netbsd.org:
        Table 1. Platforms supported by pkgsrc:
        Platform 	   Date Support Added
        NetBSD 	           Aug 1997
        Solaris 	   Mar 1999
        Linux 	           Jun 1999
        Darwin (Mac OS X)  Oct 2001
        FreeBSD 	   Nov 2002
        OpenBSD 	   Nov 2002
        IRIX 	           Dec 2002
        BSD/OS 	           Dec 2003
        AIX 	           Dec 2003
        Interix  	   Mar 2004
        DragonFlyBSD 	   Oct 2004
        OSF/1 	           Nov 2004
        HP-UX 	           Apr 2007
        QNX 	           Oct 2007
        Haiku 	           Sep 2010
        
        That's with just one minute of researching package systems.