DrWhy has asked for the wisdom of the Perl Monks concerning the following question:
I'd like to arrange things so that if the server is started and the perl process managing it crashes then the server get's shut down, too. The easiest way to do this is through an END block, but I what I want to do is to have the END block 'active' (that is, it will execute on shutdown) only if the server is running. So I'd like to put the END block in place after successful server startup and then remove it after successful server shutdown -- that is after perl code successfully shuts it down on purpose.
I've found the CPAN module Manip::END, but wonder if there is a better solution out there?
--DrWhy
"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Manipulating END blocks
by CountZero (Bishop) on Sep 13, 2007 at 19:14 UTC | |
|
Re: Manipulating END blocks
by ikegami (Patriarch) on Sep 13, 2007 at 20:01 UTC | |
by DrWhy (Chaplain) on Sep 13, 2007 at 20:16 UTC | |
by perrin (Chancellor) on Sep 13, 2007 at 20:49 UTC |