[Catalyst] Handy shotcuts

Matt S Trout dbix-class at trout.me.uk
Sun Apr 6 18:20:03 BST 2008


On Thu, Mar 20, 2008 at 01:17:18PM +0300, Alex Povolotsky wrote:
> Hello!
> 
> I've implemented
> 
> $c->uri_redirect($path) as a shortcut to 
> $c->res->redirect($c->uri_for($path))
> 
> and
> 
> $c->uri_redirect_d($path) as $c->uri_redirect($path); $c->detach()
> 
> I guess these shortcuts are really useful. Patch is attached.

(1) Patches will -never- be attached without tests.

If you haven't written tests, you should assume your code doesn't work.

(2) There's no reason to pollute the core Catalyst with these; you could
easily release this as a plugin.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the Catalyst mailing list