Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: Unique testing problemby adrianh (Chancellor) |
on May 24, 2003 at 11:19 UTC ( [id://260559]=note: print w/replies, xml ) | Need Help?? |
So you better go along the lines of BazB's suggestion, as an exit would kill your mod_perl on a webserver Nobody's mentioned mod_perl :-) Also, since perl 5.6, mod_perl overrides exit behind the scenes so it's often a non-issue. No need to fumble with exit here. Just just die and return reasonable stuff. See SIGDIE by Adam for an elaboration on that. I would not recommend using a __DIE__ handler in mod_perl code. It's global nature causes problems if you need to support multiple applications, virtual hosts, etc. Alternative Exception Handling Techniques in the mod_perl guide has more info on this. Personally, if there was the opportunity, I would probably try to refactor the code so that there were not multiple exit points for the program, rather than throwing exceptions into the mix. Multiple exit points are a Code Smell in my experience.
In Section
Seekers of Perl Wisdom
|
|