[Catalyst] Re: Dispatching based on path and host/domain

Matt S Trout dbix-class at trout.me.uk
Fri Apr 25 15:54:02 BST 2008


On Wed, Apr 23, 2008 at 10:56:07PM +0200, Aristotle Pagaltzis wrote:
> * Matt S Trout <dbix-class at trout.me.uk> [2008-04-23 21:40]:
> > On Wed, Apr 23, 2008 at 03:25:47PM +0100, Curtis Fletcher wrote:
> > > Digging around, is it a sane thing to have:
> > > 
> > > __PACKAGE__->_action_class('Catalyst::Action::MyAction');
> > > 
> > > At the top of a controller if I want all of the methods to
> > > use the same non-default ActionClass? I'm nervous about using
> > > anything that starts with _
> > 
> > It starts with _ because you should never call it from
> > -outside- the class.
> > 
> > You're fine calling it on your own class.
> 
> So if I want to use a particular Action class as the default for
> all my actions, I can do that by creating my own controller base
> class where I put that at the top and then have my controllers
> inherit from that instead of directly from Catalyst::Controller?

Yes.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the Catalyst mailing list