in reply to Re: Unique testing problem
in thread Unique testing problem
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.
|
|---|