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
Attachment:
pgp8OCTAc9hEq.pgp
Description: PGP signature
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.