8.1. Introduction

mod_perl is another, better way to create dynamic web pages. It is faster and far more flexible than CGI and has the advantage of being based on Perl. Thus it provides the dual benefit of building on the knowledge base you’ve gained by studying Perl, and taking advantage of the entire Perl base.

mod_perl is a fully functional Perl interpreter embedded in the Apache webserver, making the Perl interpreter always available for CGI programs—there is no extra step to load Perl into memory. Also, mod_perl is smart enough to cache CGI programs in memory, so if a CGI program is run multiple times, it is compiled only once. The result is a considerable improvement in speed.

Speed is not the only advantage of mod_perl. It also gives ...

Get Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP 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.