stas 02/05/22 19:29:26 Modified: src/docs/2.0/user/compat compat.pod src/docs/2.0/user/config config.pod src/docs/2.0/user/overview overview.pod Log: - move to the 1.0/2.0 notation - update for the recent GlobalRequest change Revision Changes Path 1.18 +23 -23 modperl-docs/src/docs/2.0/user/compat/compat.pod Index: compat.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/compat/compat.pod,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- compat.pod 22 May 2002 06:06:20 -0000 1.17 +++ compat.pod 23 May 2002 02:29:26 -0000 1.18 @@ -1,23 +1,23 @@ =head1 NAME -Migrating from mod_perl 1.x to mod_perl 2.x +Migrating from mod_perl 1.0 to mod_perl 2.0 =head1 Description -This chapter explains how to port code from mod_perl 1.x to mod_perl -2.x. +This chapter explains how to port code from mod_perl 1.0 to mod_perl +2.0. -=head1 Configuration Porting +=head1 Configuration Files Porting -To migrate the configuration files to the mod_perl 2.x syntax, you may +To migrate the configuration files to the mod_perl 2.0 syntax, you may need to do certain adjustments if you use any of the configuration directives listed in the following sections. Remember that if you use any of the new directives, your configuration -won't work anymore with mod_perl 1.x. +won't work anymore with mod_perl 1.0. =head2 C<PerlHandler> @@ -61,27 +61,27 @@ =head1 Code Porting -mod_perl 2.x is trying hard to be back compatible with mod_perl -1.x. However some things (mostly APIs) have been changed. In order to -gain a complete compatibilty with 1.x while running under 2.x, you +mod_perl 2.0 is trying hard to be back compatible with mod_perl +1.0. However some things (mostly APIs) have been changed. In order to +gain a complete compatibilty with 1.0 while running under 2.0, you should load the compatibility module as early as possible: use Apache::compat; at the server startup. And unless there are forgotten things or bugs, -your code should work without any changes under 2.x series. +your code should work without any changes under 2.0 series. -If you have mod_perl 1.x and 2.x installed on the same system and the +If you have mod_perl 1.0 and 2.0 installed on the same system and the two use the same perl libraries directories (e.g. I</usr/lib/perl5>), make sure to load first the C<Apache2> module which will perform the necessary adjustments to C<@INC>. - use Apache2; # if you have 1.x and 2.x installed + use Apache2; # if you have 1.0 and 2.0 installed use Apache::compat; -However, unless you want to keep the 1.x compatibility, you should try +However, unless you want to keep the 1.0 compatibility, you should try to remove the compatibility layer and adjust your code to work under -2.x without it. You want to do it mainly for the performance +2.0 without it. You want to do it mainly for the performance improvement. This document explains what APIs have changed and what new APIs should @@ -92,16 +92,16 @@ C<Apache::Registry>, C<Apache::PerlRun> and other modules from the registry family now live in the C<ModPerl::> namespace to avoid -collisions with the versions from 1.x. +collisions with the versions from 1.0. -To run the C<Apache::Registry> module from mod_perl 1.x you have to +To run the C<Apache::Registry> module from mod_perl 1.0 you have to load C<Apache::compat> at the startup: file:startup.pl: ---------------- - use Apache2; # if you have 1.x and 2.x installed + use Apache2; # if you have 1.0 and 2.0 installed use Apache::compat (); - use lib ...; # to find 1.xx Apache::Registry + use lib ...; # to find 1.0x Apache::Registry then in I<httpd.conf>: @@ -162,7 +162,7 @@ passing a string to this method. C<$r-E<gt>content()> and C<$r-E<gt>args()> in an array context were -mistakes that never should have been part of the mod_perl 1.x +mistakes that never should have been part of the mod_perl 1.0 API. There multiple reason for that, among others: =over @@ -212,7 +212,7 @@ =head2 C<$r-E<gt>connection-E<gt>user> -This method is deprecated in 1.x and C<$r-E<gt>user> should be used +This method is deprecated in 1.0 and C<$r-E<gt>user> should be used instead for both versions of mod_perl. C<Apache::user()> method is available since mod_perl version 1.24_01. @@ -252,7 +252,7 @@ C<header_in()>, C<header_out()> and C<err_header_out()> are not available in 2.0. Use C<headers_in()>, C<headers_out()> and -C<err_headers_out()> instead (which should be used in 1.x as +C<err_headers_out()> instead (which should be used in 1.0 as well). For example you need to replace: $r->err_header_out("Pragma" => "no-cache"); @@ -313,7 +313,7 @@ =head2 C<send_fd()> and C<send_fd_length()> -currently available only in the 1.x compatibility layer. The problem +currently available only in the 1.0 compatibility layer. The problem is that Apache has changed the API and the its functionality. See the implementation in C<Apache::compat>. @@ -393,7 +393,7 @@ =head2 Method Handlers -In mod_perl 1.x the method handlers could be specified by using the +In mod_perl 1.0 the method handlers could be specified by using the C<($$)> prototype: package Bird; 1.10 +17 -0 modperl-docs/src/docs/2.0/user/config/config.pod Index: config.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/config/config.pod,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- config.pod 22 May 2002 19:14:09 -0000 1.9 +++ config.pod 23 May 2002 02:29:26 -0000 1.10 @@ -181,6 +181,23 @@ This setting is needed for example if you use C<CGI.pm> to process the incoming request. +This setting is enabled by default for sections configured as: + + <Location ...> + ... + SetHandler perl-script + </Location> + +And can be disabled with: + + <Location ...> + ... + SetHandler perl-script + PerlOptions -GlobalRequest + </Location> + + + =head2 C<ParseHeaders> Scan output for HTTP headers, same functionality as mod_perl 1.0's 1.8 +3 -1 modperl-docs/src/docs/2.0/user/overview/overview.pod Index: overview.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/overview/overview.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- overview.pod 22 May 2002 12:13:44 -0000 1.7 +++ overview.pod 23 May 2002 02:29:26 -0000 1.8 @@ -1178,7 +1178,9 @@ =item * -Method calls faster than subroutine calls! +Method calls faster than subroutine calls! + +(XXX: only in the future) =item *
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]