Perl Training Logo: Praying Mantis
Getting started with mod_perl
Trainer(s):Stas Bekman
Length:1 day
Target Audience: People with at least basic Perl and Apache knowledge. A basic CGI script writing experience is necessary.

What is mod_perl? mod_perl is an Apache server plugin module that embeds a Perl interpreter into the server, making CGI scripts run very fast. It provides object-oriented Perl interfaces to the Apache API, but can be used to run unchanged CGI scripts.

Explore widely used strategies of coupling mod_perl with another Apache server or/and Squid proxy server to improve performance and reduce system requirements. Learn to port and develop CGI scripts and modules under mod_perl, about persistent database connections and various performance improvement techniques.

This course uses mod_perl 1.0 as a base, but most techniques are applicable under mod_perl 2.0.

You will learn:

  • Basic Installation and Configuration
  • Performance setup strategies: light vs heavy server, mod_proxy and squid.
  • Porting existing CGI scripts
  • Developing code under mod_perl
  • mod_perl and RDBMS databases: such as persistent DB connections, cached DBI statements
  • Performance improvement tips: reducing memory usage by deploying shared memory, module preloading techniques, avoiding importing of variables and global variables in general, forking and subprocess overhead, object method calls vs. functions, sending compressed HTML, performance of print calls and buffer flushing, tuning Apache configuration directives for best performance by benchmarking the scripts
See also: Stas Bekman
mod_perl 2.0, the next generation