Chapter 24. mod_perl 2.0: Installation and Configuration
Since Doug MacEachern introduced mod_perl 1.0[1] in 1996, he has
had to tweak it with every change in Apache and Perl, while
maintaining compatibility with the older versions. These rewrites
have led to very complex source code, with hundreds of
#ifdefs and workarounds for various
incompatibilities in older Perl and Apache versions.
Apache 2.0, however, is based on a new threads design, requiring that mod_perl be based on a thread-safe Perl interpreter. Perl 5.6.0 was the first Perl version to support internal thread-safety across multiple interpreters. Since Perl 5.6.0 and Apache 2.0 are the very minimum requirements for the newest version of mod_perl, backward compatibility was no longer a concern, so this seemed like a good time to start from scratch. mod_perl 2.0 was the result: a leaner, more efficient mod_perl that’s streamlined for Apache 2.0.
mod_perl 2.0 includes a mechanism for building the Perl interface to
the Apache API automatically, allowing us to easily adjust mod_perl
2.0 to the ever-changing Apache 2.0 API during its development
period. Another important feature is the
Apache::Test framework, which was originally
developed for mod_perl 2.0 but then was adopted by Apache 2.0
developers to test the core server features and third-party modules.
Moreover the tests written using the Apache::Test
framework could be run with Apache 1.0 and 2.0, assuming that both
supported the same features.
Many other interesting ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access