Mailing List Archive

svn commit: r479006 - /perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod
Author: stas
Date: Fri Nov 24 13:33:47 2006
New Revision: 479006

URL: http://svn.apache.org/viewvc?view=rev&rev=479006
Log:
fix broken examples (Jim Brandt spotted those)

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

Modified: perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod
URL: http://svn.apache.org/viewvc/perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod?view=diff&rev=479006&r1=479005&r2=479006
==============================================================================
--- perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod (original)
+++ perl/modperl/docs/trunk/src/docs/2.0/user/porting/compat.pod Fri Nov 24 13:33:47 2006
@@ -935,17 +935,18 @@
C<$s-E<gt>register_cleanup> has been replaced with
C<L<APR::Pool::cleanup_register()|docs::2.0::api::APR::Pool/C_cleanup_register_>>
which accepts the pool object as the first argument instead of the
-server object. e.g.:
+server object, a callback function as a second and data variable as
+the optional third argument. If that data argument was provided it is
+then passed to the callback function when the time comes for the pool
+object to get destroyed.

use Apache2::ServerUtil ();
sub cleanup_callback {
- my ($pool, $s) = @_;
+ my $data = shift;
# your code comes here
- Apache2::Const::OK;
+ return Apache2::Const::OK;
}
- $s->push_handlers(PerlChildExitHandler => \&my_access);
-
-where the arguments are the pool and server objects.
+ $s->pool->cleanup_register(\&cleanup_callback, $data);

See also
C<L<PerlChildExitHandler|docs::2.0::user::handlers::server/C_PerlChildExitHandler_>>.
@@ -1279,7 +1280,8 @@

=head2 C<$r-E<gt>register_cleanup>

-C<$r-E<gt>register_cleanup> has been replaced with
+Similarly to C<$s-E<gt>register_cleanup>, C<$r-E<gt>register_cleanup>
+has been replaced with
C<L<APR::Pool::cleanup_register()|docs::2.0::api::APR::Pool/C_cleanup_register_>>
which accepts the pool object as the first argument instead of the
request object. e.g.:



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