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)
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 | [reply] |
Re: Installing a script
by Anonymous Monk on Aug 24, 2009 at 02:55 UTC
|
perl Makefile.PL INSTALLSCRIPT=something/custom/bin
make
make test
make install
or if you process @ARGV yourselfmake install INSTALLSCRIPT=something/custom/bin
Don't forget the PL_FILES option. | [reply] [d/l] [select] |
|
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.
| [reply] [d/l] [select] |
|
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 demo.pl /example.pl /generatefoo.pl into the module tree by default.
Sometimes you need to read the question closely.
Thank you
| [reply] |
|
|
|
|