[Catalyst] Applying roles that contain actions.

Bill Moseley moseley at hank.org
Wed Sep 5 20:48:41 GMT 2012

I've been injecting models into Catalyst apps (either using
CatalystX::InjectComponent or just stuffing an instance into
$app->components hash).

I'd also like to be able to apply roles to existing controllers.   If I try
to ->apply the role it fails if using MooseX::MethodAttributes::Role.
 Which I assume is because the actions would not be registered with

Is there a way to inject actions in this way?

Currently I just manually apply the role directly in the existing
controller, so not a huge issue, but would be handy if I could just add a
role to the base class and pull in all the components -- or dynamically add
the actions.

In general, what I'm after is a way to specify "with App::Feature::Widget;"
in my app base class and bring in an entire feature.

I'm also looking at a "gatekeeper" type of feature control that Facebook is
known for:


-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120905/7e558=

More information about the Catalyst mailing list