On Thu, 12 Dec 2002, Andy Wolf wrote: >Using MakeMaker for modules is clear and works for me so far but my >application also contains a CGI-script,
I don't think you can install that automatically, the location of CGI scripts varies so much between systems and is normally tied in to the URL it's served at. Anyway installing a CGI script on a public server has security implications and so it ought always to be done by hand. >some textual documentation, some images and XSL-stylesheets located >in an htdocs-directory and some binaries. These are all a case of some 'files' that need to be copied 'somewhere'. And as far as I can tell there is no support in MakeMaker to simply say 'this file goes there'. For my own application I have much the same problem, and I ended up writing lots of extra MakeMaker code to add targets to the generated Makefile. I added a 'plaindoc_install' target to put things under .../share/doc/ and I made this a dependency of the normal 'install' target. With binaries, I think you should be able to put them under EXE_FILES, even if they are not Perl programs. I also have a CGI script as part of the distribution but for reasons mentioned above it isn't installed automatically. The Makefile.PL just checks some dependencies. If you want to have a look, download a source tarball from <http://sourceforge.net/project/showfiles.php?group_id=39046> but I really cannot recommend the final Makefile.PL as an example of clean coding. It's 'necessary hackery' at best. >and the administrator is requested to add 'Alias' and 'ScriptAlias' >directives to it's Apache configuration... You could write a program to do that and add it to the generated Makefile, but it's probably better to just 'echo' and prompt the administrator. >Is MakeMaker the wrong tool for this task ? Well, kind of, but its useful abilities for Perl programs may outweigh that if your package is heavily Perl-based? >Do I have to invent the wheel and write my own installation script ? >Or can this be done somehow with a simple "perl Makefile.PL" ? Yes and yes - you'll have to write some of your own code (or adapt my version or someone else's) and then put it in the Makefile.PL. s/simple//; -- Ed Avis <[EMAIL PROTECTED]>
