the exit is broken in some contexts.
if this is part of a subroutine or called from an execute that may be the
problem.

I am setting a global exit variable until this is fixed.  i.e

GWC.htm
[$ sub mysub $]
[- unless(dothis()){
    $GWC::xitflg==1;
    exit
-]
[$ endsub $]

somepage.htm
[- Execute({inputfile => 'GWC.htm', mtime => 1, import => 1})-]
[- mysub(); exit if $GWC::xitflg; -]
<html>
etc..
</html>

this is going to be fixed in the next release

cliff rayman
genwax.com

Dirk Lutzebaeck wrote:

> Cliff Rayman writes:
>  > if you are going to redirect in embperl then you need to put an exit after
>  > $r->status(REDIRECT).
>  > just setting that variable does not cause embperl to exit.  so,
>  >
>  > [-
>  >   use Apache;
>  >   use Apache::Constants qw(REDIRECT);
>  >
>  >   $r = Apache->request;
>  >
>  >   $r->header_out("Location" => "x.html");
>  >   $r->status(REDIRECT);
>  >   exit;
>  > -]
>  > 2
>  >
>  > should do the trick.
>
> I'm sorry Cliff, it doesn't work for me. I tried Apache::exit() and
> exit(). Does it work for you? Maybe I'm doing something wrong.
>
> Dirk

Reply via email to