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/porting compat.pod
Date Fri, 06 Jun 2003 05:51:26 GMT
stas        2003/06/05 22:51:26

  Modified:    src/docs/2.0/user/porting compat.pod
  Log:
  document the changes in the apis of: $connection->local_addr and
  $connection->remote_addr
  
  Revision  Changes    Path
  1.9       +27 -1     modperl-docs/src/docs/2.0/user/porting/compat.pod
  
  Index: compat.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/porting/compat.pod,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- compat.pod	26 May 2003 04:41:18 -0000	1.8
  +++ compat.pod	6 Jun 2003 05:51:26 -0000	1.9
  @@ -860,11 +860,37 @@
   
   to set it up for earlier stages than response handler.
   
  -=head2  C<$connection-E<gt>user>
  +=head2 C<$connection-E<gt>user>
   
   This method is deprecated in mod_perl 1.0 and C<$r-E<gt>user> should
   be used instead for both versions of mod_perl. C<$r-E<gt>user()>
   method is available since mod_perl version 1.24_01.
  +
  +=head2 C<$connection-E<gt>local_addr>
  +
  +See the next item.
  +
  +=head2 C<$connection-E<gt>remote_addr>
  +
  +C<$connection-E<gt>local_addr> and C<$connection-E<gt>remote_addr>
  +return an C<L<APR::SocketAddr|docs::2.0::api::APR::SocketAddr>> object
  +and you can use this object's methods to retrieve the wanted bits of
  +information, so if you had a code like:
  +
  +  use Socket 'sockaddr_in';
  +  my ($serverport, $serveraddr) = sockaddr_in($r->connection->local_addr);
  +  my ($remoteport, $remoteaddr) = sockaddr_in($r->connection->remote_addr);
  +
  +now it'll be written as:
  +
  +  require APR::SockAddr;
  +  my $serverport = $c->local_addr->port_get;
  +  my $serveraddr = $c->local_addr->ip_get;
  +  my $remoteport = $c->remote_addr->port_get;
  +  my $remoteaddr = $c->remote_addr->ip_get;
  +
  +META: it's not simple to fix this in the compat layer, since it'll
  +break the API for normal Apache 2.0 modules. Stay tuned for solutions.
   
   =head1 C<Apache::File>
   
  
  
  

---------------------------------------------------------------------
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