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 ServerUtil.pod
Date Fri, 16 Jul 2004 01:41:00 GMT
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


Mime
View raw message