Jump to content

mod_perl

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Norvoid (talk | contribs) at 10:03, 8 October 2015. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

mod_perl
Developer(s)Apache Software Foundation
Stable release
2.0.9 / June 18, 2015 (2015-06-18)[1]
Repository
Operating systemCross-platform
PlatformPerl
TypePerl module for Apache HTTP server
LicenseApache License 2.0
Websiteperl.apache.org

mod_perl is an optional module for the Apache HTTP server. It embeds a Perl interpreter into the Apache server. In addition to allowing Apache modules to be written in the Perl programming language, it allows the Apache web server to be dynamically configured by Perl programs. However, its most common use is so that dynamic content produced by Perl scripts can be served in response to incoming requests, without the significant overhead of re-launching the Perl interpreter for each request.

Slash, which runs the web site Slashdot, is written using mod_perl.[2] Early versions of PHP were implemented in Perl using mod_perl.[3]

Compare to Common Gateway Interface (CGI)

mod_perl can emulate a Common Gateway Interface (CGI) environment, so that existing Perl CGI scripts can benefit from the performance boost without having to be re-written.

Unlike CGI (and most other web application environments), mod_perl provides complete access to the Apache API, allowing programmers to write handlers for all phases in the Apache request cycle, manipulate Apache's internal tables and state mechanisms, share data between Apache processes or threads, alter or extend the Apache configuration file parser, and add Perl code to the configuration file itself, among other things.

See also

References

  1. ^ "mod_perl changelog". svn.apache.org. Retrieved October 8, 2015.
  2. ^ "Slash installation". slashcode.com.
  3. ^ "Paying Homage to Perl (PHP)". theperlreview.com. February 2003.