Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Installing a script

by astroboy (Chaplain)
on Aug 23, 2009 at 21:39 UTC ( #790690=perlquestion: print w/replies, xml ) Need Help??
astroboy has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, I use Module::Starter to prepare my Perl modules and install them via the standard make, make test and mast install routine. However, how do I add a perl script to the list of things to install. And how do I (or the installing user) specify where the scripts are installed (e.g. I'd like to offer a default prompt of /usr/local/bin and allow the user installing the packages to specify an alternative location)

Replies are listed 'Best First'.
Re: Installing a script
by astroboy (Chaplain) on Aug 24, 2009 at 02:30 UTC
    Ok, the EXE_FILES parameter in Makefile.PL allows you to specify the the files to be installed in the bin. According to the ExtUtils::MakeMaker doco, there is a prompt command, but it's not clear how to use it. I'm guessing if I can piece things together then somehow the prompted value could be used to set the location to the prompted value
Re: Installing a script
by Anonymous Monk on Aug 24, 2009 at 02:55 UTC
    use ExtUtils::MakeMaker::prompt, but this should suffice
    perl Makefile.PL INSTALLSCRIPT=something/custom/bin make make test make install
    or if you process @ARGV yourself
    make install INSTALLSCRIPT=something/custom/bin
    Don't forget the PL_FILES option.

      INSTALLSCRIPT says where to install them (which should be set automatically by PREFIX and the newer & better INSTALL_BASE), not what to install.

      PL_FILES is completely unrelated.

        not what to install.

        Astroboy answered the first part of the question (EXE_FILES) himself. INSTALLSCRIPT/prompt answers the second part.

        PL_FILES is completely unrelated.

        PL_FILES is simply important; It needs to be managed. Many (even the initiated) overlook that it will install your / / into the module tree by default.

        Sometimes you need to read the question closely.

        Thank you

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://790690]
Approved by Perlbotics
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2018-02-23 20:31 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (310 votes). Check out past polls.