Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

12.3. Apache and mod_perl

The biggest problem with CGI programming is that it is slow. Each request fires off a CGI script from scratch. Perl must first parse and compile the script and any modules you use (including the Template Toolkit, of course) before it can even start to generate content.

The mod_perl extension to Apache makes these problems go away. Rather than writing Perl CGI scripts, you write Perl handlers that sit "inside" the web server. The handlers and any modules they use are loaded and compiled when the server starts. Once Perl has compiled them into an internal "opcode" tree, they can be executed quickly, efficiently, and repeatedly with minimal overhead.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial