Re: [Catalyst] uri_for() and Chained endpoints: a proposed convenience method

2007-01-26 Thread Ash Berlin
Jason Gottshall wrote: In using chained dispatch, I found that getting URIs for specific endpoints felt a bit clumsy: package MyApp::C::Foo; sub get_foo : Chained('/') PathPart('foo') CaptureArgs(0) {} sub do_bar : Chained('foo') PathPart('bar') Args(2) {} package MyApp::C::Qux s

Re: [Catalyst] uri_for() and Chained endpoints: a proposed convenience method

2007-01-26 Thread Nilson Santos Figueiredo Junior
On 1/26/07, Jason Gottshall <[EMAIL PROTECTED]> wrote: 1) Is my convenience method a sensible approach, or is there a "better" way to do this? I usually stuff this inside MyApp.pm: sub uri_for_action { my ($c, $controller, $action, @params) = @_; $c->uri_for( $c->controller($control

Re: [Catalyst] uri_for() and Chained endpoints: a proposed convenience method

2007-01-26 Thread Matt S Trout
On 26 Jan 2007, at 20:41, Jason Gottshall wrote: In using chained dispatch, I found that getting URIs for specific endpoints felt a bit clumsy: I wanted a way to condense the fairly wordy call to $c->controller()->action_for(), so I added the following convenience method to MyApp.pm: sub ur

[Catalyst] uri_for() and Chained endpoints: a proposed convenience method

2007-01-26 Thread Jason Gottshall
In using chained dispatch, I found that getting URIs for specific endpoints felt a bit clumsy: package MyApp::C::Foo; sub get_foo : Chained('/') PathPart('foo') CaptureArgs(0) {} sub do_bar : Chained('foo') PathPart('bar') Args(2) {} package MyApp::C::Qux sub index: Private { m