in reply to Re^8: Is $^M a leftover April Fool?
in thread Is $^M a leftover April Fool?
1. If your die handler doesn't function as you expect when you force a memory scarcity situation on your process.
2. Big enough to contain all the thingies you create in your die handler.
3. Watching memory usage of the process. Seeing your handler start working when it didn't in a memory scarcity situation.
As a demo your sample is about all there is to it. Set $^M to the space you may need. The rest is automagical, except figuring out what size to set it.
How often is this an issue? See #1 above; how often do people feel the need to do resource scarcity testing? How often do people recompile Perl to enable odd features? How often do people use signal handlers? Most people--never.
Your estimate question and somewhat similar statements in this thread make me feel you expect too much of this mechanism. You don't go into your die handler, then jump back to your program to live again. Instead you use the memory to die in an effective manner, you use it to say your last words.
Be well,
rir
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Is $^M a leftover April Fool?
by BrowserUk (Patriarch) on Jan 07, 2005 at 08:00 UTC |