Chapter 23. SPEEDING UP DYNAMIC WEB SITES

Introducing the Apache mod_perl Module

You can enable the Apache mod_perl module as a way to embed the Perl interpreter directly within your Apache Web server. Doing this makes your CGI script's respond much faster because Apache has most of the Perl code preloaded into memory before the first user visits your Web site. If your CGI scripts import any Perl modules, mod_perl will keep them active in memory after your program is finished, so subsequent CGI load times will become faster.

Without mod_perl, each time a user types in your CGI script's URL, the Apache CGI handler reads the first line of the script to identify the file type and supporting binary interpreter. This is why all your CGI scripts have ...

Get Perl and Apache: Your visual blueprint for developing dynamic Web content now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.