> Gerald Richter wrote:
> You can't keep Embperl from doing so, but that isn't really the problem. The
> problem is that you have to tell Apache to generate the error page for you.
> In a Apache::Registry script you can do this by
>
> sub notfound
> {
> return 404 ;
> }
>
> but this isn't possible within a Embperl page. So either use
> Apache::Registry for that purpose, because you won't display any HTML
> anyway, or use your code above and generate your own errorpage, instead of
> let Apache do this for you. This should work quite well
>
> Gerald
>
I am returning HTML. Lots of it. My example was simply to illustrate my attempt
to return a 404. What follows may be a better way of communicating my
intentions.
[-
# Do a lot of DBI stuff.
.
.
.
if ($records_not_found_so_I_cannot_generate_the_page) {
$req_rec->status('404');
exit;
}
-]
<html>
<!-- Lot's of HTML -->
.
.
.
</html>
But, I understand what you mean by having to return a 404.
I've managed to do redirects from Embperl by setting the status and adding
a Location header. I was hoping that I could do the same for a 404.
I suppose I am going to be told that I have to chain handlers and the like,
so I'll start reading the guide.
Wouldn't it be easier if there as a way to set the return value from within
Embperl?
Alan Gutierrez - [EMAIL PROTECTED]