ExtUtils::MakeMaker - how to distribute CGI script?

B

bwooster47

Is there any documentation on how to distribute CGI scripts using the
ExtUtils::MakeMaker mechanisms?

It has EXE_FILES which are copied to the INSTALLSCRIPT location, is
there something similar for CGI scripts? CGI scripts need modification/
config before install, so maybe a automatic install is not possible,
in which case - is there a preferred guideline on how to include
example CGI scripts in a Perl module distribution?

For example, I've a Foo::Bar package.
It has Bar.pm
It also has bar.cgi example script. Where should this script be
included? Can't be listed in the EXE_FILES, or in the bin/ directory,
because it is really not a script.
 
B

brian d foy

Is there any documentation on how to distribute CGI scripts using the
ExtUtils::MakeMaker mechanisms?

It has EXE_FILES which are copied to the INSTALLSCRIPT location, is
there something similar for CGI scripts? CGI scripts need modification/
config before install, so maybe a automatic install is not possible,
in which case - is there a preferred guideline on how to include
example CGI scripts in a Perl module distribution?

An automatic install is certainly possible.

The PL_FILES key has a list of scripts to run and turn into files. It's
up to you what those scripts do, so you can do just about anything.

However, have you considered taking everything that you'd need to
configure and moving it outside the script?
 
B

bwooster47

However, have you considered taking everything that you'd need to
configure and moving it outside the script?

Let's say that is done - how does one distribute a .cgi file, that
needs to go into something like /var/www/html/cgi-bin, in a Perl
Module package?
There is the current concept of putting scripts into the bin/ folder,
and modules in lib/ directories. Not sure if there is a similar
mechanism for CGI scripts.
 
B

brian d foy

Let's say that is done - how does one distribute a .cgi file, that
needs to go into something like /var/www/html/cgi-bin, in a Perl
Module package?
There is the current concept of putting scripts into the bin/ folder,
and modules in lib/ directories. Not sure if there is a similar
mechanism for CGI scripts.

You just change where the scripts in blib/bin install, or you make a
new directory in blib for just the CGI scripts, and tell the Makefile
how to install those (probably by adding a new make target).

It's all in the ExtUtils::MakeMaker docs.

Good luck :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,516
Members
44,984
Latest member
PeakCBDGummiesReview

Latest Threads

Top