Subject: | Overriden create_action applies roles to actions defined in Catalyst::Controller |
Hi,
I've reported that on #catalyst and got it fixed at github, so I'm
reporting it here just to make sure it's not lost.
Summary:
when Catalyst::Controller::ActionRole::create_action is called it
applies all roles defined via
__PACKAGE__->config( action_roles => [qw(...)] )
to /^_(DISPATCH|BEGIN|AUTO|ACTION|END)$/ defined in Catalyst::Controller
that causes the Catalyst::ActionRole::* modules to have their
around 'execute' => sub {}
called for mentioned above as well
Failing tests are at:
http://github.com/ajgb/catalyst-controller-actionrole/commit/358f5791935f1efd06b9ea6bed7b3792448463fc
I've got that fixed by skipping applying roles to actions mentioned
above - commits in my fork up to c0864d868e8cf634a4f8e2d1aa7a6d9ded556716.
After talking to t0m on #catalyst I've started to turn the
Catalyst::Controller::ActionRole into
Catalyst::TraitFor::Controller::ActionRole and making the previous
obsolete, but still working:
http://github.com/ajgb/catalyst-controller-actionrole
(Which is a merge of the as_trait branch into master).
When it was done I've talked with rafl on #catalyst to see it
reviewed/applied and it lead to conclusion that ActionRole functionality
actually should be a part of core Catalyst::Controller.
Cheers,
Alex