| Team-Fly | | | Webmaster in a Nutshell, 3rd Edition By Robert Eckstein, Stephen Spainhour | Table of Contents | | Chapter 15. Web Server Programming with mod_perl | 15.1 Installing mod_perl If you already have Apache installed on your machine, you will have to rebuild it with mod_perl. You can get the source and documentation for mod_perl from http://perl.apache.org/. If there isn't already an Apache httpd in the Apache source tree, you must build one. Then build mod_perl as directed in the INSTALL file for the mod_perl distribution. As we've mentioned, mod_perl allows you to hook in Perl modules as handlers for various stages of a request. By default, however, the only callback hook that is enabled is PerlHandler, which is the one that processes content (i.e., a CGI document). If you want to use other hooksfor example, to extend Apache's logging facilities via the PerlLogHandler directive; you need to specify it at build time as directed in the INSTALL file. For example: % perl Makefile.PL PERL_LOG=1 The mod_perl Makefile replaces the httpd in the Apache source tree with a Perl-enabled one. When you install mod_perl, it installs not only the new httpd in your system area, but also several Perl modules, including Apache::Registry. |