Leo Charre > WWW-Autosite > installwebfiles.PL

Download:
WWW-Autosite-1.08.tar.gz

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

installwebfiles.PL - script to use in a distro to install web files

DESCRIPTION ^

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

Example

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.

If you want to try it out

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.

A Note On Directory Trees

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.

PREREQUIRED MODULES ^

File::Copy and File::Path

SEE ALSO ^

Module::Build and ExtUtils:::MakeMaker.

AUTHOR ^

Leo Charre leocharre (at) cpan (dot) org

syntax highlighting: