[Catalyst] Re: How to redirect before some code excute

Fayland Lam fayland at gmail.com
Fri Oct 27 01:08:02 BST 2006


Matt S Trout wrote:
> Fayland Lam wrote:
>> 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.
> 
> $c->res->redirect(...);
> $c->finalize_headers;
> 
> <while loop or whatever here>
> 
> might do the trick
> 

no, it doesn't work. maybe there is something concerned with 'butter', 
it's not sent immediately.
and I use mod_perl2, so I'd like to have a try of system.
Thanks any way.



More information about the Catalyst mailing list