[Catalyst-dev] RFC: action_uri
Matt S Trout
dbix-class at trout.me.uk
Mon Oct 2 18:51:49 CEST 2006
Jonathan Rockway wrote:
>> $c->controller('Foo::Bar')->action_for('baz')->uri_for($c, bla);
>
> This is my favorite, although I would write:
>
> $c->controller('Foo::Bar')->action('baz')->uri({key => "value"});
>
> Basically I have two questions in my mind after reading your proposed
> syntax:
>
> 1) Why is there a distinction between controller and action (controller
> is just controller, action is action_for)
Because otherwise anybody with a controller method called "action" would have
been fucked trying to use it.
And given action_for was added for 5.70 I didn't fancy our chances of nobody
having such a method already :)
--
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-dev
mailing list