IIRC, PERL_DESTRUCTOR_LEVEL is a #define that sets how many passes perl makes at trying to destroy things in order when the interpreter ends normaly, before destroying things out of order (or just killing them -- I don't recall which). Strangely, google and perldoc.com don't show any hits for PERL_DESTRUCTOR_LEVEL -- try greping the perl source for it, and reading nearby comments.
Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).
| [reply] |
Actually, I grep'd for it in both 5.8 and 5.6.1 sources before I answered. No hits. It seems the reason for that is that the define in question is PERL_DESTRUCT_LEVEL rather than PERL_DESTRUCTOR_LEVEL. I should have been a little more general with my grep the first time, I suppose.
-sauoq
"My two cents aren't worth a dime.";
| [reply] |
It seems you are talking about PERL_DESTRUCT_LEVEL rather than PERL_DESTRUCTOR_LEVEL. Thank theorbtwo for motivating a more thorough search.
You can find more out about it by reading the perlhack.pod that comes with 5.8. In short, setting it to two should allow you to see what memory perl is expecting to be cleaned up at exit() and hasn't explicitly cleaned up itself.
If you are asking in reference to mod_perl, it seems the apache module uses the same variable for other stuff. Read the mod_perl docs for info.
-sauoq
"My two cents aren't worth a dime.";
| [reply] |
It... uh... doesn't do anything different for me. ;-)
What are you talking about anyway? Is that supposed to be an environment variable, a compile time define, a variable in some specific script, or something else entirely?
I don't think I've ever heard of it.
-sauoq
"My two cents aren't worth a dime.";
| [reply] |