I think you don't need to worry about putting stuff in a BEGIN block as you've indicated -- I believe that mod_perl is clever enough to do what you want it to.
If you edit something, an old version of the script might still be in memory. Years ago I would do an apachectl graceful to get Apache to pay attention to the change I'd just made. Sometimes that wouldn't work, and I'd have to rename the file, press refresh a couple dozen times until I got the "Unknown module" error, then restore the file and continue testing.
I think you can still call exit as you're suggesting -- to stop execution of that instance of the code. But a test should be fairly easy to set up.
I wish I could provide more information, but my experience comes from a period of frantic web development in 1998-2000, and some more recent 'dabbling' that has re-introduced me to mod_perl without actually giving me time to get really familiar with it.
Good luck!
In reply to Re: Knowing what works with mod_perl
by talexb
in thread Knowing what works with mod_perl
by Coruscate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |