=head1 NAME mod_perl 2.0 renaming =head1 Description This document discusses the effects of the decision to rename parts of the mod_perl API. =head1 Synopsis During a sequence of release candidates leading up to the official release of mod_perl 2, in late December, 2004 there was considerable discussion regarding the choice of namespaces for the 2.0 API. The main concern expressed was that some of the C modules used in mod_perl 2 had the same names as those in mod_perl 1. After a lively and, at times, heated debate, a proposal was made to rename parts of the mod_perl 2 API - see the thread at L. This proposal was subsequently voted on and then adopted. =head1 Changes The main changes involved in this renaming are as follows. =over =item * Rename all C modules to C, save for the following exceptions: =over 4 =item * The C modules in the C distribution are unaffected by this rename. =item * Constants under the C namespace, such as C, are now called as C (for example, C). =item * Constants under the C namespace, such as C, are now called as C (for example, C). =back =item * Crequest()> has been renamed to Crequest()>. =item * Cserver()> has been renamed to Cserver()>. =item * Rename C to C =item * Discontinue the practice of installing mod_perl in a relative F subdirectory, so that the use of C to adjust C<@INC> is no longer needed. =back Concurrent with these changes, a decision was also made to refuse to install mod_perl 2 in the same Perl tree as any installed mod_perl 2 package of version prior to 1.999_22. =head1 Effects The mod_perl developers did not take lightly the effects of changing the API at such a late stage in the development cycle. For most users the change to the new API should be relatively straightforward: =over =item * Before installing mod_perl 2, either remove an earlier mod_perl 2 installation (prior to 1.999022), or else choose to install the new version in a different area. To remove enough of a prior installation of mod_perl 2 in order to satisfy this requirement, one can do, on Unix, % find /usr/lib/perl5 -name 'Apache2*' -exec rm -rf {} \; where F is the top-level root of your Perl tree. Note that this will also remove any 3rd party Apache modules installed under an F subdirectory. In many situations you would want to do this, as such modules will need porting to the new API. However, if there are modules under this location that you want to keep, you can use % find /usr/lib/perl5 -name 'Apache2*' -exec ls -lR {} \; to list the files under this tree. For Win32 ppm users, the command ppm> remove mod_perl within the ppm shell will remove an installed C ppm package. =item * If building mod_perl 2 from source, the C argument of C is no longer supported. =item * Replace the use of use Apache::SomeCoreModule; in a script or module by use Apache2::SomeCoreModule; Similarly, an Apache directive PerlModule Apache::SomeCoreModule in an F file should be replaced by PerlModule Apache2::SomeCoreModule and C should be replaced by C in the same places. Note that "core modules" are defined as those that ship with the mod_perl 2 distribution. Other CPAN modules in the C namespace may not follow the same conventions. =item * Replace the use of constants C by C and C by C. =item * Remove any occurrences of use Apache2; in a script or module, as well as PerlModule Apache2 in an Apache configuration file. =item * In a script or module, replace Crequest()> by Crequest()> and Cserver()> by Cserver()>. =item * If using C you will need to upgrade to version 3.11 - versions 3.10 and older contain bugs and versions 3.07 and older do not support support the new mod_perl API. you can get C from L. =back Beginning with mod_perl-1.999_22, an environment variable C<$ENV{MOD_PERL_API_VERSION}> has been added to specify which mod_perl version is being used. =head1 See Also The directions for L. Help is also available through the archives of and subscribing to the L. =head1 Authors L. =cut