[Catalyst] How to redirect before some code excute
fayland
fayland at gmail.com
Wed Oct 25 07:50:22 GMT 2006
i want to redirect before the loop excute , but it seems redirect
happens after the loop finish. is there any plugin or method to do this?
my code
.....
$c->res->redirect(' http://www.yahoo.com' <http://www.yahoo.com%27>);
my $n;
while($n<99999) {
$c->log->debug($n);
$n++;
}
$c->log->debug('asaaaaaaaaaaaa');
........
of course. the while loop is faked. indeed it's something involved with $c.
the logic of Catalyst is run the whole sub over then call end. but I
want to print redirect to visitor then run the while in backend.
is that clear enough?
Thanks for help.
--
Fayland Lam // http://www.fayland.org/
More information about the Catalyst
mailing list