installwebfiles.PL - script to use in a distro to install web files
Have you ever wondered how to get your Makefile.PL to install cgi scripts and html files?
Don't change your Makefile.PL, just drop in this script together with your distro instead. It must remain called *.PL for this to work.
This script is called automatically when a user does a perl Makefile.PL and then runs make. It's a small hack to intall web files into a hosting account. Users can do it via cpan.
They are prompted to opt out before anything is done. It is meant to be as least annoying and intrussive as possible.
It reads your MANIFEST file for any entries beginning in public_html/... and cgi-bin/... and installs to
~/cgi-bin
and
~/public_html
A sample MANIFEST file
public_html/seeme.html cgi-bin/autosite/wraphtm.cgi cgi thing t/pod.html.t test lib/WWW/Autosite.pm api and api manual MANIFEST this file Makefile.PL module installed META.yml Module meta-data (added by MakeMaker) installwebfiles.PL easy install web stuffs, optional
This script would look for the MANIFEST in the same directory, and from the above example would copy anything in public_html and cgi bin to appropriate places.
Drop it into your development dir, to
perl Makefile.PL make install
If your MANIFEST has public_html and cgi-bin entries they can be installed by the script.
The script will not create a cgi-bin and public_html directories if they do not exist in your $HOME directory. However, if they do exist and some file is specified as say 'public_html/this/that/taht/filehere.txt', that directory tree is created.
File::Copy and File::Path
Module::Build and ExtUtils:::MakeMaker.
Leo Charre leocharre (at) cpan (dot) org
To install WWW::Autosite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Autosite
CPAN shell
perl -MCPAN -e shell install WWW::Autosite
For more information on module installation, please visit the detailed CPAN module installation guide.