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/api/Apache Connection.pod URI.pod RequestRec.pod
Date Thu, 12 Aug 2004 06:19:39 GMT
stas        2004/08/11 23:19:39

  Modified:    src/docs/2.0/api/Apache Connection.pod URI.pod
                        RequestRec.pod
  Log:
  finish Apache::Connection and Apache::URI
  
  Revision  Changes    Path
  1.10      +125 -51   modperl-docs/src/docs/2.0/api/Apache/Connection.pod
  
  Index: Connection.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Connection.pod,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -u -r1.9 -r1.10
  --- Connection.pod	2 Aug 2004 05:34:23 -0000	1.9
  +++ Connection.pod	12 Aug 2004 06:19:38 -0000	1.10
  @@ -8,15 +8,58 @@
   =head1 Synopsis
   
     use Apache::Connection ();
  +  
  +  # is connection still open?
  +  $status = $c->aborted;
  +  
  +  # base server
  +  $base_server = $c->base_server();
  +  
  +  # needed for creating buckets/brigades
  +  $ba = $c->bucket_alloc();
  +  
  +  # unique connection id
  +  $id = $c->id();
  +  
  +  # connection filters stack
  +  $input_filters = $c->input_filters();
  +  $output_filters = $c->output_filters();
  +  
  +  # keep the connection alive?
  +  $status = $c->keepalive();
  +  
  +  # how many requests served over the current connection
  +  $served = $c->keepalives();
  +  
  +  # this connection's local and remote socket addresses
  +  $local_sa  = $c->local_addr();
  +  $remote_sa = $c->remote_addr();
  +  
  +  # local and remote hostnames
  +  $local_host = $c->local_host();
  +  $remote_host = $c->remote_host();
  +  
  +  # server and remote client's IP addresses
  +  $local_ip = $c->local_ip();
  +  $remote_ip = $c->remote_ip();
  +  
  +  # connection level Apache notes
  +  $notes = $c->notes();
  +  
  +  # this connection's pool
  +  $p = $c->pool();
  +
  +
   
  -META: to be completed
   
   
   
   
   =head1 Description
   
  -META: to be completed
  +C<Apache::RequestRec> provides the Perl API for Apache connection
  +record object.
  +
   
   
   
  @@ -40,7 +83,7 @@
   =item obj: C<$c>
   ( C<L<Apache::Connection object|docs::2.0::api::Apache::Connection>> )
   
  -=item ret: C<$status> (number)
  +=item ret: C<$status> ( boolean )
   
   true if the connection has been aborted, false if still open
   
  @@ -53,9 +96,11 @@
   
   
   
  +
  +
   =head2 C<base_server>
   
  -Physical vhost this connection came in on
  +Physical server this connection came in on (main server or vhost):
   
     $base_server = $c->base_server();
   
  @@ -64,7 +109,8 @@
   =item obj: C<$c>
   ( C<L<Apache::Connection object|docs::2.0::api::Apache::Connection>> )
   
  -=item ret: C<$base_server> (C<L<Apache::Server|docs::2.0::api::Apache::ServerRec>>)
  +=item ret: C<$base_server>
  +( C<L<Apache::Server object|docs::2.0::api::Apache::ServerRec>> )
   
   =item since: 1.99_12
   
  @@ -74,9 +120,9 @@
   
   
   
  -=head2 C<bucket_alloc>
   
  -META: Autogenerated - needs to be reviewed/completed
  +
  +=head2 C<bucket_alloc>
   
   The bucket allocator to use for all bucket/brigade creations
   
  @@ -87,34 +133,15 @@
   =item obj: C<$c>
   ( C<L<Apache::Connection object|docs::2.0::api::Apache::Connection>> )
   
  -=item ret: C<$ba> (C<L<APR::BucketAlloc|docs::2.0::api::APR::BucketAlloc>>)
  +=item ret: C<$ba>
  +( C<L<APR::BucketAlloc object|docs::2.0::api::APR::BucketAlloc>> )
   
   =item since: 1.99_12
   
   =back
   
  -
  -
  -
  -
  -=head2 C<conn_config>
  -
  -META: Autogenerated - needs to be reviewed/completed
  -
  -Notes on *this* connection
  -
  -  $ret = $c->conn_config();
  -
  -=over 4
  -
  -=item obj: C<$c>
  -( C<L<Apache::Connection object|docs::2.0::api::Apache::Connection>> )
  -
  -=item ret: C<$ret> (C<L<Apache::ConfVector|docs::2.0::api::Apache::ConfVector>>)
  -
  -=item since: 1.99_12
  -
  -=back
  +This object is needed by C<L<APR::Bucket|docs::2.0::api::APR::Bucket>>
  +and C<L<APR::Brigade|docs::2.0::api::APR::Brigade>> methods/functions.
   
   
   
  @@ -148,8 +175,8 @@
   Get/set the first filter in a linked list of protocol level input
   filters:
   
  -  $input_filters      = $r->input_filters();
  -  $prev_input_filters = $r->input_filters($new_input_filters);
  +  $input_filters      = $c->input_filters();
  +  $prev_input_filters = $c->input_filters($new_input_filters);
   
   =over 4
   
  @@ -290,18 +317,21 @@
   
   
   
  +
  +
   =head2 C<local_addr>
   
   Get this connection's local socket address
   
  -  $sa = $c->local_addr();
  +  $local_sa = $c->local_addr();
   
   =over 4
   
   =item obj: C<$c>
   ( C<L<Apache::Connection object|docs::2.0::api::Apache::Connection>> )
   
  -=item ret: C<$sa> (C<L<APR::SockAddr|docs::2.0::api::APR::SockAddr>>)
  +=item ret: C<$local_sa>
  +( C<L<APR::SockAddr object|docs::2.0::api::APR::SockAddr>> )
   
   =item since: 1.99_12
   
  @@ -311,6 +341,8 @@
   
   
   
  +
  +
   =head2 C<local_host>
   
   used for ap_get_server_name when UseCanonicalName is set to DNS
  @@ -329,7 +361,9 @@
   
   =back
   
  -
  +META: you probably shouldn't use this method, but (
  +C<L<get_server_name|docs::2.0::api::Apache::RequestUtil/C_get_server_name_>>
  +) if inside request and C<$r> is available.
   
   
   
  @@ -355,29 +389,42 @@
   
   
   
  -=head2 C<notes>
   
  -META: Autogenerated - needs to be reviewed/completed
   
  -send note from one module to another, must remain valid for all
  -requests on this conn
   
  -  $c->notes($notes);
  -  $notes = $c->notes();
  +=head2 C<notes>
  +
  +Get/set text notes for the duration of this connection. These notes can
  +be passed from one module to another (not only mod_perl, but modules
  +in any other language):
  +
  +  $notes      = $c->notes();
  +  $prev_notes = $c->notes($new_notes);
   
   =over 4
   
   =item obj: C<$c>
   ( C<L<Apache::Connection object|docs::2.0::api::Apache::Connection>> )
   
  -=item arg1: C<$notes> (C<L<APR::Table|docs::2.0::api::APR::Table>>)
  +=item opt arg1: C<$new_notes>
  +( C<L<APR::Table object|docs::2.0::api::APR::Table>> )
  +
  +=item ret: C<$notes>
  +( C<L<APR::Table object|docs::2.0::api::APR::Table>> )
  +
  +the current notes table.
   
  -=item ret:
  +if the C<$new_notes> argument was passed, returns the previous value.
   
   =item since: 1.99_12
   
   =back
   
  +Also see
  +C<L<$r-E<gt>notes|docs::2.0::api::Apache::RequestRec/C_notes_>>
  +
  +
  +
   
   
   
  @@ -429,7 +476,8 @@
   =item obj: C<$c>
   ( C<L<Apache::Connection object|docs::2.0::api::Apache::Connection>> )
   
  -=item ret: C<$p> (C<L<APR::Pool|docs::2.0::api::APR::Pool>>)
  +=item ret: C<$p>
  +( C<L<APR::Pool object|docs::2.0::api::APR::Pool>> )
   
   =item since: 1.99_12
   
  @@ -445,14 +493,15 @@
   
   Get this connection's remote socket address
   
  -  $sa = $c->remote_addr();
  +  $remote_sa = $c->remote_addr();
   
   =over 4
   
   =item obj: C<$c>
   ( C<L<Apache::Connection object|docs::2.0::api::Apache::Connection>> )
   
  -=item ret: C<$sa> (C<L<APR::SockAddr|docs::2.0::api::APR::SockAddr>>)
  +=item ret: C<$remote_sa>
  +( C<L<APR::SockAddr object|docs::2.0::api::APR::SockAddr>> )
   
   =item since: 1.99_12
   
  @@ -462,6 +511,8 @@
   
   
   
  +
  +
   =head2 C<remote_ip>
   
   Client's IP address
  @@ -505,20 +556,36 @@
   
   
   
  +=head1 Unsupported API
  +
  +C<Apache::Connection> also provides auto-generated Perl interface for
  +a few other methods which aren't tested at the moment and therefore
  +their API is a subject to change. These methods will be finalized
  +later as a need arises. If you want to rely on any of the following
  +methods please contact the L<the mod_perl development mailing
  +list|maillist::dev> so we can help each other take the steps necessary
  +to shift the method to an officially supported API.
  +
  +
   
  -=head2 C<remote_logname>
   
  -Only ever set if doing rfc1413 lookups.  N.B. Only access this through
  -get_remote_logname()
   
  -  $remote_logname = $c->remote_logname();
  +
  +
  +=head2 C<conn_config>
  +
  +Config vector containing pointers to connections per-server config
  +structures
  +
  +  $ret = $c->conn_config();
   
   =over 4
   
   =item obj: C<$c>
   ( C<L<Apache::Connection object|docs::2.0::api::Apache::Connection>> )
   
  -=item ret: C<$remote_logname> (string)
  +=item ret: C<$ret>
  +( C<L<Apache::ConfVector object|docs::2.0::api::Apache::ConfVector>> )
   
   =item since: 1.99_12
   
  @@ -546,6 +613,13 @@
   =item since: 1.99_12
   
   =back
  +
  +META: Not sure how this can be used from mod_perl at the
  +moment. Unless C<Apache::Scoreboard> is extended to provide a hook to
  +read from this variable.
  +
  +
  +
   
   
   
  
  
  
  1.8       +1 -1      modperl-docs/src/docs/2.0/api/Apache/URI.pod
  
  Index: URI.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/URI.pod,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- URI.pod	29 May 2004 09:56:29 -0000	1.7
  +++ URI.pod	12 Aug 2004 06:19:38 -0000	1.8
  @@ -317,7 +317,7 @@
   
   Unescape URLs
   
  -  unescape_url($url);
  +  Apache::URI::unescape_url($url);
   
   =over 4
   
  
  
  
  1.29      +5 -3      modperl-docs/src/docs/2.0/api/Apache/RequestRec.pod
  
  Index: RequestRec.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/RequestRec.pod,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -u -r1.28 -r1.29
  --- RequestRec.pod	9 Aug 2004 03:09:10 -0000	1.28
  +++ RequestRec.pod	12 Aug 2004 06:19:38 -0000	1.29
  @@ -1065,8 +1065,9 @@
   
   =head2 C<notes>
   
  -Get/set text notes that can be passed from one module to another (not
  -only mod_perl, but modules in any other language):
  +Get/set text notes for the duration of this request. These notes can
  +be passed from one module to another (not only mod_perl, but modules
  +in any other language):
   
     $notes      = $r->notes();
     $prev_notes = $r->notes($new_notes);
  @@ -1917,7 +1918,8 @@
   
   =head2 C<request_config>
   
  -Notes on *this* request
  +Config vector containing pointers to request's per-server config
  +structures
   
     $ret = $r->request_config($newval);
   
  
  
  

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