On Monday 05 March 2007 12:42, Sergey Borodich wrote: > I need some technique what work as > PerlRequire (or PerlPostConfigHandler) > at apache start (it run only once) > > but I need similar technique for stop apache > it must run if "apache stop" only once > > it need for cleanup shared memory before stop, etc > > and also desirably for mp1/mp2 both > > prompt something please...
1) Create an object and store it in a global variable. Then use the DESTROY method to do what you want. That is what Perl::AtEndOfScope does. 2) Another way for mp2: create a cleanup handler APR::Pool::cleanup_register for one of the global pools. Apache2::ServerRec::pool or Apache2::Process::pool come to mind. 3) And what about a simple END{} block? Torsten
pgpNkcCNf10nb.pgp
Description: PGP signature