[Catalyst] Re: How to redirect before some code excute
Fayland Lam
fayland at gmail.com
Thu Oct 26 01:46:41 GMT 2006
Lee Standen wrote:
> It's a subroutine, right?
>
> Tried a return?....such as:
>
> $c->res->redirect('http://www.yahoo.com');
> return undef;
Indeed I want to run the 'while' loop in backend. 'return' would not run
the loop I think.
>
>
>
> fayland wrote:
>> 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.
>>
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/[email protected]/
> Dev site: http://dev.catalyst.perl.org/
>
More information about the Catalyst
mailing list