Hi all,

I would like to mix in the same action some custom ActionRoles (via Catalyst::Controller::ActionRole) and Catalyst::Action::REST.

I gave it a try in a test application, but the action roles are getting applied to both the main action and the method-specific action:

# Main action
sub index :Path :Args(0) :Does('Role1') :Does('Role2') :ActionClass('REST') {
    ...
}

# GET specific action
sub index_GET {
    ...
}

In this scenario, I'm getting Role1 and Role2 functions executed twice, which is not desired.

I wonder if someone out there is using it (or another approach which provides the same features), and if there is a sane way to mix both functionalities without shoot myself in the foot

Maybe would be interesting to have a Catalyst::ActionRole::REST, providing the same features than Catalyst::Action::REST, but encapsulated in a role?

If I'm saying something silly, or if I'm missing some point which makes this impossible, please let me know.

Thanks in advance for your comments!

--
Miquel Ruiz

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to