View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Leo Charre > WWW-Autosite-1.08 > installwebfiles.PL


Annotate this POD


New  1
Open  0
View/Report Bugs


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





A sample MANIFEST file

        cgi-bin/autosite/wraphtm.cgi  cgi thing
        t/pod.html.t                                            test
        lib/WWW/                             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.


File::Copy and File::Path


Module::Build and ExtUtils:::MakeMaker.


Leo Charre leocharre (at) cpan (dot) org

syntax highlighting: