perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-docs/src/docs/2.0/user/compat compat.pod
Date Thu, 06 Jun 2002 08:54:29 GMT
stas        2002/06/06 01:54:29

  Modified:    src/docs/2.0/user/compat compat.pod
  Log:
  document:
  - Deprecated Constants
  - Apache->server
  
  Revision  Changes    Path
  1.25      +31 -0     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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- compat.pod	5 Jun 2002 17:37:17 -0000	1.24
  +++ compat.pod	6 Jun 2002 08:54:29 -0000	1.25
  @@ -172,6 +172,30 @@
   script, which can tell you how to port the constants to 2.0? Currently
   C<Apache::compat> doesn't provide a complete back compatibility layer.
   
  +=head2 Deprecated Constants
  +
  +C<REDIRECT> and similar constants have been deprecated in Apache for
  +years, in favor of the C<HTTP_*> names. mod_perl 2.0 API performs the
  +following aliasing behind the scenes:
  +
  +     NOT_FOUND     => 'HTTP_NOT_FOUND',
  +     FORBIDDEN     => 'HTTP_FORBIDDEN',
  +     AUTH_REQUIRED => 'HTTP_UNAUTHORIZED',
  +     SERVER_ERROR  => 'HTTP_INTERNAL_SERVER_ERROR',
  +     REDIRECT      => 'HTTP_MOVED_TEMPORARILY',
  +
  +but we suggest moving to use the C<HTTP_*> names. For example if
  +running in 1.0 compatibility mode change:
  +
  +  use Apache::Constants qw(REDIRECT);
  +
  +to:
  +
  +  use Apache::Constants qw(HTTP_MOVED_TEMPORARILY);
  +
  +This will work in both mod_perl generations.
  +
  +
   =head2 C<SERVER_VERSION()>
   
   C<Apache::Constants::SERVER_VERSION()> has been replaced with:
  @@ -188,6 +212,13 @@
   
   
   =head1 C<Apache::> Methods
  +
  +=head2 C<Apache-E<gt>server>
  +
  +C<Apache-E<gt>server> now resides in C<Apache::ServerUtil>. To use it
  +add:
  +
  +  use Apache::ServerUtil ();
   
   =head2 C<Apache-E<gt>request>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message