You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by st...@apache.org on 2004/07/16 03:41:00 UTC

cvs commit: modperl-docs/src/docs/2.0/api/Apache ServerUtil.pod

stas        2004/07/15 18:41:00

  Modified:    src/docs/2.0/api/Apache ServerUtil.pod
  Log:
  Apache::ServerUtil is complete
  
  Revision  Changes    Path
  1.26      +67 -42    modperl-docs/src/docs/2.0/api/Apache/ServerUtil.pod
  
  Index: ServerUtil.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/ServerUtil.pod,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -u -r1.25 -r1.26
  --- ServerUtil.pod	16 Jul 2004 01:11:03 -0000	1.25
  +++ ServerUtil.pod	16 Jul 2004 01:41:00 -0000	1.26
  @@ -8,13 +8,37 @@
   =head1 Synopsis
   
     use Apache::ServerUtil ();
  -  
     $s = Apache->server;
  +  
  +  # push config
  +  $s->add_config(['ServerTokens off']);
  +  
  +  # add components to the Server signature
  +  $s->add_version_component("MyModule/1.234");
  +  
  +  # access PerlSetVar/PerlAddVar values
     my $srv_cfg = $s->dir_config;
     
  -  # get 'conf/' dir path using (avoid using this function!)
  +  # check command line defines
  +  print "this is mp2"
  +      if Apache::ServerUtil::exists_config_define('MODPERL2');
  +  
  +  # get PerlChildExitHandler configured handlers
  +  @handlers = @{ $s->get_handlers('PerlChildExitHandler') || []};
  +  
  +  # server build and version info:
  +  $when_built = Apache::ServerUtil::get_server_built();
  +  $version = Apache::ServerUtil::get_server_version();
  +  
  +  # ServerRoot value
  +  $server_root = Apache::ServerUtil::server_root();
  +  
  +  # get 'conf/' dir path (avoid using this function!)
     my $dir = Apache::ServerUtil::server_root_relative($r->pool, 'conf');
     
  +  # set child_exit handlers
  +  $r->set_handlers(PerlChildExitHandler => \&handler);
  +  
     # server level PerlOptions flags lookup
     $s->push_handlers(ChildExit => \&child_exit)
         if $s->is_perl_option_enabled('ChildExit');
  @@ -23,15 +47,13 @@
     $s->method_register('NEWGET');
   
   
  -META: to be completed
  -
   
   
   
   =head1 Description
   
   C<Apache::ServerUtil> provides the L<Apache server
  -object|docs::2.0::api::Apache::Server> utilities API.
  +object|docs::2.0::api::Apache::ServerRec> utilities API.
   
   
   
  @@ -234,36 +256,6 @@
   
   
   
  -
  -=head2 C<error_log2stderr>
  -
  -Start sending STDERR to the error_log file
  -
  -  $s->error_log2stderr();
  -
  -=over 4
  -
  -=item obj: C<$s>
  -( C<L<Apache::ServerRec object|docs::2.0::api::Apache::ServerRec>> )
  -
  -The current server
  -
  -=item ret: no return value
  -
  -=item since: 1.99_10
  -
  -=back
  -
  -This method may prove useful if you want to start redirecting STDERR
  -to the error_log file before Apache does that on the startup.
  -
  -
  -
  -
  -
  -
  -
  -
   =head2 C<exists_config_define>
   
   Check for a definition from the server startup command line
  @@ -348,7 +340,7 @@
   
   The server build time string
   
  -=item since: 1.99_10
  +=item since: 1.99_15
   
   =back
   
  @@ -370,7 +362,7 @@
   
   The server version string
   
  -=item since: 1.99_10
  +=item since: 1.99_15
   
   =back
   
  @@ -548,7 +540,7 @@
   
   =item ret: C<$server_root> ( string )
   
  -=item since: 1.99_10
  +=item since: 1.99_15
   
   =back
   
  @@ -584,7 +576,7 @@
   with a trailing C</>. (it's the same as using C<''> as C<$fname>'s
   value).
   
  -=item since: 1.99_10
  +=item since: 1.99_15
   
   =back
   
  @@ -647,9 +639,6 @@
   
   
   
  -
  -
  -
   =head2 C<set_handlers>
   
   Set a list of handlers to be called for a given phase. Any previously
  @@ -712,6 +701,42 @@
   or
   
     $r->set_handlers(PerlCleanupHandler => undef);
  +
  +
  +
  +
  +=head1 Unsupported API
  +
  +C<Apache::ServerUtil> 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<error_log2stderr>
  +
  +Start sending STDERR to the error_log file
  +
  +  $s->error_log2stderr();
  +
  +=over 4
  +
  +=item obj: C<$s>
  +( C<L<Apache::ServerRec object|docs::2.0::api::Apache::ServerRec>> )
  +
  +The current server
  +
  +=item ret: no return value
  +
  +=item since: 1.99_10
  +
  +=back
  +
  +This method may prove useful if you want to start redirecting STDERR
  +to the error_log file before Apache does that on the startup.
   
   
   
  
  
  

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