Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Using perl's Extutils::MakeMaker or Module::Build to install applications

by Anonymous Monk
on Nov 07, 2007 at 13:55 UTC ( [id://649484]=perlquestion: print w/replies, xml ) Need Help??

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

Fellow monks,

Can you guys share your experience on using Perl module building method like Extutils::MakeMaker or Module::Build (or perhaps yet another one) to install applications that are written in Perl mixed with other stuffs.

My application is comprised of several scripts, many of them written in Perl but there are also a few shell and Ruby scripts. There are Perl modules in lib/perl/ as well as lib/ruby/ and lib/php/. Other stuffs include PHP and HTML files that will be copied to docroot, non-POD documentation, icons, sample config files, etc. All in all there are over 1000 files.

Currently to install everything I only use a shell script with an rsync command. The shell accepts an argument which is the prefix / root directory to install to. Luckily there is no compilation step necessary in my scripts, they can simply be copied from the source directory to the destination directory.

I package everything in a tarball, and user can simply extract the tarball and invoke the install shell script mentioned above to install the application.

I am now planning to allow users to choose PREFIX as well as BIN_DIR, SBIN_DIR, LOCALSTATE_DIR, a la autoconf. However I am not familiar at all with autoconf, and I have a feeling it is a little overkill, since my application does not contain C or any other program which needs to be compiled ilke C.

The premise of using a build and install method like normal Perl/CPAN modules is attractive for me because at least I've created one or two Perl modules, and there are utilities to convert a Perl module to an RPM/deb package, which will let my users install my application with greater ease as well as spare me the trouble of having to create a .spec or debian/ control files, with which I am not really familiar either.

Any input is appreciated. Thanks.

  • Comment on Using perl's Extutils::MakeMaker or Module::Build to install applications

Replies are listed 'Best First'.
Re: Using perl's Extutils::MakeMaker or Module::Build to install applications
by CountZero (Bishop) on Nov 08, 2007 at 08:55 UTC
    Module::Build does not depend on make with its arcane syntax and is a more "pure" Perl solution, so in principle it can do anything Perl can do and has been designed to make it easier to sub-class than MakeMaker and it advertises to run on all systems which carry Perl 5.6 or later.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Using perl's Extutils::MakeMaker or Module::Build to install applications
by andyford (Curate) on Nov 07, 2007 at 19:35 UTC

    Personally, I would consider just using 'make'. User would then untar and run something like 'make install' after setting the variables. I've done it a few times and it was easy to grab a random Makefile from somewhere and just modify it.

Re: Using perl's Extutils::MakeMaker or Module::Build to install applications
by KurtSchwind (Chaplain) on Nov 08, 2007 at 23:11 UTC
    I'd autoconfiscate it. Using auto-tools with make you'll be golden. Most people know how to install using:
    ./configure make make install
    and it sounds like you have a pretty trivial setup. I can actually give you the setup if you need help.
    --
    I used to drive a Heisenbergmobile, but every time I looked at the speedometer, I got lost.
Re: Using perl's Extutils::MakeMaker or Module::Build to install applications
by valdez (Monsignor) on Nov 12, 2007 at 22:04 UTC

    App::Build extends Module::Build to build/install/configure entire applications (i.e. web applications), not just modules and programs.

    It's great for installing applications and easily extendable.

    Ciao, Valerio

Re: Using perl's Extutils::MakeMaker or Module::Build to install applications
by Anonymous Monk on Nov 14, 2007 at 08:38 UTC
    Thanks for all the input! I'm now weighing the available options.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://649484]
Approved by lima1
Front-paged by almut
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-19 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found