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

Matt S Trout dbix-class at trout.me.uk
Thu Oct 26 16:42:06 BST 2006


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

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list