To use ModPerl, do I have to put the extra lines in my http.conf file?
You need to add an alias directive so that you have a directory which is where you will place your mod_perl scripts. Then you need to add a Location directivev which configures the directory so that files therein are handled by the Apache::Registry Handler and executed under mod_perl. Will htaccess do?
No Also, I thought I heard that there was a way to simply "include" a library at the top of a Perl script to use ModPerl. Is this true?
No, the grunt work of mod_perl itself is done at Apache startup time. Running in Apache::Registry mode it is often possible to run existing CGI scripts under mod_perl to get the performance benefits without significant re-writing. Of course, the scripts need to be "well behaved" in their use of global variables. The book Practical mod_perl will provide invaluable advice and information, as will the basic mod_perl documentation from the apache.org website. Their are specific sections of the doc's on just these issues.
jdtoronto
|