On Thu, 28 Oct 1999, Public Interactive wrote:

> I'd like to be able to prematurely end the thread of execution
> within a Perl apache module from someplace *other than* the
> PerlHandler entry point subroutine (usually "handler()").  That is,
> when I'm a few subroutines deep inside my module, I want to be able
> to spit out an error page and have the module finish as if handler()
> had returned OK.  Right now I'm painstakingly propagating return
> values back up to my handler() subroutine, but I'm hoping there's a
> better way.

here's a possible option (from my Mail/.sent-mail a few weeks back):
...
or use this undocumented feature:

$Apache::ERRSV_CAN_BE_HTTP = 1; #set this anywhere, startup script is best
die FORBIDDEN;

mod_perl peeks at $@, if it's a 3 digit http status code, it propagates
that value to Apache.

Reply via email to