In my main Embperl module, I added this function:

sub redirect {
    # Redirect the request to a new page - and stop processing before doing any
    # further harm
    my ($to);
    $to = shift;

    $http_headers_out{Location} = $to;
    exit 0;
}

That way, the moment I set a redirect by using this function, all
processing finishes - Very useful, for example, when making access
controls. And it works, too. However, calling 'exit 0' produces the
following error in the log:

[Thu Aug 10 01:08:22 2006] [error] [19700]ERR:  24:  Error in Perl code: 
component at /home/gwolf/cvs/comas/trunk/embperl/base.pm line 156, <GEN15> line 
4.\n

Of course, Embperl could not finish processing the page as it
expected. Is there a way to signal Embperl to abort processing without
filling my logs with this?

Thanks again,

-- 
Gunnar Wolf - [EMAIL PROTECTED] - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to