FAQ
"Bill" == Bill Moseley writes:
Bill> What I was asking it how to override potentially any method in a
Bill> chain of Actions and to magically swap the the root of the
Bill> chain. ?Sounds ugly and confusing.

That's perfectly viable, here's a few scenarios:

- override the action sub and declare the new attributes accordingly
- if you don't want to mess with the chaining, make the chained
action forward to a private action, then override it
- if you do want to mess with the attributes (Chained, PathPart, etc.) use
configuration in the child controller, like this:

__PACKAGE__->config(action => { foo => { Chained => '/bar } });

Note that you can make any method in a controller magically become an action,
by merely providing config in the way described above.

--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edencardim.com http://www.shadowcat.co.uk/servers/

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedFeb 16, '12 at 12:40a
activeFeb 21, '12 at 1:42p
posts4
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Bill Moseley: 3 posts Eden Cardim: 1 post

People

Translate

site design / logo © 2021 Grokbase