perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r109607 - /perl/modperl/docs/trunk/src/docs/2.0/user/coding/coding.pod
Date Fri, 03 Dec 2004 00:47:16 GMT
Author: stas
Date: Thu Dec  2 16:47:16 2004
New Revision: 109607

URL: http://svn.apache.org/viewcvs?view=rev&rev=109607
Log:
fix the server restart cleanup example

Modified:
   perl/modperl/docs/trunk/src/docs/2.0/user/coding/coding.pod

Modified: perl/modperl/docs/trunk/src/docs/2.0/user/coding/coding.pod
Url: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/2.0/user/coding/coding.pod?view=diff&rev=109607&p1=perl/modperl/docs/trunk/src/docs/2.0/user/coding/coding.pod&r1=109606&p2=perl/modperl/docs/trunk/src/docs/2.0/user/coding/coding.pod&r2=109607
==============================================================================
--- perl/modperl/docs/trunk/src/docs/2.0/user/coding/coding.pod	(original)
+++ perl/modperl/docs/trunk/src/docs/2.0/user/coding/coding.pod	Thu Dec  2 16:47:16 2004
@@ -66,18 +66,22 @@
 C<L<cleanup_register|docs::2.0::api::APR::Pool/C_cleanup_register_>>
 on the pool object of choice. Here are some examples of its usage:
 
-To run something at the server shutdown and restart use
-C<$s-E<gt>pool-E<gt>cleanup_register()> in F<startup.pl>:
+To run something at the server shutdown and restart use a cleanup
+handler registered on
+C<L<base_server_pool()|docs::2.0::api::Apache::ServerUtil/C_base_server_pool_>>
+in F<startup.pl>:
 
   #PerlRequire startup.pl
   use Apache::ServerUtil ();
   use APR::Pool ();
   
   warn "parent pid is $$\n";
-  my $pool = Apache->server->pool;
-  $pool->cleanup_register(\&cleanup);
+  $base_server_pool = Apache::ServerUtil::base_server_pool();
+  $base_server_pool->cleanup_register(\&cleanup);
   sub cleanup { warn "server cleanup in $$\n" }
 
+C<L<base_server_pool()|docs::2.0::api::Apache::ServerUtil/C_base_server_pool_>>.
+
 This is usually useful when some server-wide cleanup should be
 performed when the server is stopped or restarted.
 
@@ -110,6 +114,9 @@
 In this example the cleanup callback gets called, when C<$pool> goes
 out of scope and gets destroyed. This is very similar to OO C<DESTROY>
 method.
+
+
+
 
 
 =head1 Goodies Toolkit

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