stas 2003/05/29 20:47:07 Modified: src/docs/2.0/user/handlers http.pod Log: polish the new section Revision Changes Path 1.20 +12 -7 modperl-docs/src/docs/2.0/user/handlers/http.pod Index: http.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/handlers/http.pod,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- http.pod 30 May 2003 03:41:36 -0000 1.19 +++ http.pod 30 May 2003 03:47:07 -0000 1.20 @@ -1218,7 +1218,7 @@ The handler's configuration scope is C<L<DIR|docs::2.0::user::config::config/item_DIR>>. -There are two different ways a cleanup handler can be registered: +There are two ways to register and run cleanup handlers: =over @@ -1235,7 +1235,7 @@ In this technique the C<cleanup()> callback accepts C<$r> as its only argument. -=item 2 Using cleanup_register() method acting on the request object pool +=item 2 Using C<cleanup_register()> acting on the request object's pool Since a request object pool is destroyed at the end of each request, we can register a cleanup callback which will be executed just before @@ -1244,9 +1244,10 @@ $r->pool->cleanup_register(\&cleanup, $arg); The important difference from using the C<PerlCleanupHandler> handler, -is that here you can pass any argument to the callback function, and -no C<$r> argument is passed by default. Therefore if you need to pass -any data other than C<$r> you may want to use this technique. +is that here you can pass an optional arbitrary argument to the +callback function, and no C<$r> argument is passed by +default. Therefore if you need to pass any data other than C<$r> you +may want to use this technique. =back @@ -1254,9 +1255,11 @@ temporary file. The response handler is running C<ls -l> and stores the output in temporary file, which is then used by C<$r-E<gt>sendfile> to send the file's contents. We use -C<push_handlers()> to push C<PerlCleanupHandler> to do unlink the file -at the end of the request. +C<push_handlers()> to push C<PerlCleanupHandler> to unlink the file at +the end of the request. + #file:MyApache/Cleanup1.pm + #------------------------- package MyApache::Cleanup1; use strict; @@ -1348,6 +1351,8 @@ better version of the response and cleanup handlers, that uses this technique: + #file:MyApache/Cleanup2.pm + #------------------------- package MyApache::Cleanup2; use strict;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]