Hi,

I've been learning to use chained actions in the past few hours, and I must say I admire the though that went into them and the default values for each attribute, they are extremely elegant.

The only issue I have is with Chained('.').

I prefer to keep the actions related to the same concept in the same controller. For example, if I have a Film controller, I expect to find there the view and delete actions, for example.

With chained actions, I also expect to see this type of urls:

/films/1/view
/films/2/delete

Right now I have to write this:

package cad::Controller::Films;

use strict;
use warnings;
use base 'Catalyst::Controller';

sub films  : Chained          CaptureArgs(1) {}
sub view   : Chained('films') Args(0)        {}
sub delete : Chained('films') Args(0)        {}

I was expecting to write Chained('.') in sub view and sub delete, but to do that I would have to move them to a different controller, cad::Controller::Films::View and C::Films::Delete.

My reasoning is that '.' is the current controller, not the parent controller. I would use '..' for that one...

Any thoughs?

best regards,
--
Pedro Melo
JID: xmpp:[EMAIL PROTECTED]



_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to