[Catalyst] Overriding chained methods.

Bill Moseley moseley at hank.org
Thu Feb 16 00:40:17 GMT 2012

I have an app that is naturally hierarchical, so to make up an example a
path might be:


which I use Chained actions to implement.  And the Controllers follow that
layout as well:


Here's where I need some ideas:

Say at some point I need to change the API for an action in the City.pm
controller in a non-compatible way.  I woud like to be able to just
override that ONE method in a new controller.  For example, by adding this
(note the version number change)


which contains just the method I want to override, and then "inherit" from
the version 1.  Of course, ALL actions in version 1 would be available in
version 2.

I've have done something similar in the past, but without using Chained
actions -- although in that case the need was for a set of /guest/ actions
that had a subset of the app's actions, and I just had the /guest/*
controllers inherit from the original controllers.

Any suggestions?

-- =

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

More information about the Catalyst mailing list