> > You could use "eval" and "die", Perl's standard exception mechanism.
>
> I thought of that, but I was concerned that my module would suffer
> a performance hit. Granted, it's not a strong eval, but it just
> seems ugly. If that's the only way, I guess I'm stuck, but it seems
I don't see why there should be a performance hit. Isn't eval/die just
a setjmp/longjmp ? It's just popping up the stack when you issue a die
statement.
> to me that there should be some call like Apache->return(OK) or
> $r->return(OK) that I can call from any depth within a PerlHander
> that would behave as if handler() returned that value.
In order for mod_perl to never return to your code from that $r->return()
it would need to pop the stack, since it needs to continue execution at
the point following its call to your handler(). This means mod_perl
is executing the handler in an eval block, so now it has to take over
all exception handling. Better to do your own, you have fine control
on what and where you use it.
--
Eric