Stas Bekman > DocSet-0.19 > Handouts:

Download:
DocSet-0.19.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

Handouts: The Next Generation: mod_perl 2.0

About ^

1. What's new in Apache 2.0

2. What's new in Perl 5.6.0 - 5.8.0

3. What's new in mod_perl 2.0

4. Installing mod_perl 2.0

5. Configuring mod_perl 2.0

6. Working Examples

7. Migrating from 1.x to 2.0

Why mod_perl, the Next Generation ^

Here and in the rest of this document we refer to mod_perl 1.x series as mod_perl 1.0 and, 2.0.x as mod_perl 2.0 to keep things simple. Similarly we call Apache 1.3.x series as Apache 1.3 and 2.0.x as Apache 2.0

Since Doug MacEachern has introduced mod_perl 1.0 in 1996, he had to adjust source code to the many changes Apache and Perl went through, while staying compatible with the older versions, leading to a very complex source code, with hundreds of #ifdefs and workarounds for various incompatibilities in older Perl and Apache versions. When Apache 2.0 development was underway, the new threads design was introduced, which couldn't be supported by the existing Perl version, since it required thread-safe Perl interpreters.

Think of it as a conspiracy or just a lucky coincidence, on March 10, 2002, the first Apache 2.0 alpha version was released. 13 days later, on March 23, 2002, Perl 5.6.0 has been released. And guess what, Perl 5.6.0 was the first Perl version to support the internal thread-safeness across multiple interpreters.

Since Perl 5.6.0 and Apache 2.0 were the very minimum requirements there was no need to support older version and it was a great idea to start mod_perl 2.0 code base from scratch, incorporating the lessons learned during the 5 years of mod_perl's existence.

The new version includes a mechanism for an automatic building of the Perl interface to Apache API, which allowed us to easily adjust mod_perl 2.0 to 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.

There are multiple other interesting changes that have already happened to mod_perl in version 2.0 and more will be developed in the future. Some of these will be covered in this document and some you will discover on your own while reading mod_perl documentation.

What's new in Apache 2.0 ^

Apache 2.0 has introduces numerous new features and enhancements. Here are the most important new features:

[CUT OFF A LOT OF STUFF]

Apache::StatINC Replacement

Apache::StatINC has been replaced by Apache::Reload, which works for both mod_perl generations. To migrate to Apache::Reload simply replace:

  PerlInitHandler Apache::StatINC

with:

  PerlInitHandler Apache::Reload

However Apache::Reload provides an extra functionality, covered in the module's manpage.

A shameless plug ^

Important Links ^

syntax highlighting: