x
Loading
 Loading
Hello, Guest | Login | Register

mod_perl, Part I

Last month, I talked a bit about mod_perl, and how I used it extensively on my web server. But I was reminded by a few of my reviewers that I’ve yet to provide a good overview of mod_perl in any of my columns! Time to fix that.

Last month, I talked a bit about mod_perl, and how I used it extensively on my web server. But I was reminded by a few of my reviewers that I’ve yet to provide a good overview of mod_perl in any of my columns! Time to fix that.

As its name suggests, mod_perl is an Apache module that can be added to a statically- or dynamically-linked Apache server, or can be added later via the APXS mechanism. Generally, if your flavor of Linux has Apache, you probably have simple instructions for adding mod_perl already available. Macintosh computers running OS X already have mod_perl built-in, and there are a number of pre-built versions of Apache with mod_perl for Windows machines as well.

The Apache server goes through a number of phases when it processes an incoming request: it parses the incoming data stream; it determines what resource is being requested by the URL; it controls access, authentication, and authorization; it determines the MIME type of the response; it serves the content; and it logs what happened.

Most mod_whatevers apply to only one phase of the Apache process. For example, mod_cgi, which handles CGI scripts, deals exclusively with the content phase, and mod_auth_dbm deals with authentication using DBM files during the authentication phase. But mod_perl can alter the behavior of all phases of the request! In other words, mod_perl exposes nearly the entire Apache programming interface to Perl code so that Perl programmers can extend and embed complex behaviors easily….

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Helpful Tools for Software Developers
  2. The Github Hall of Fame
  3. Book'em, Github.
  4. This Week on Github: Stupid Ruby Tricks
  5. A Veritable Scatter Shot!
Follow Linux Magazine
Rackspace