Re: [Catalyst] base controller

2007-05-31 Thread Nigel Metheringham
On 31 May 2007, at 13:19, Matt S Trout wrote: On Thu, May 31, 2007 at 02:47:06PM +0300, Octavian Rasnita wrote: Is it a good idea to create a MyApp::Controller::Base which is based on Catalyst::Controller I'd create MyApp::ControllerBase::Whatever then to use use base MyApp::Controller::Ba

Re: [Catalyst] base controller

2007-05-31 Thread Christopher H. Laco
Octavian Rasnita wrote: > how can I access the subroutines using OOP? > > I don't want to access them with > MyApp::Controller::Base::subroutine($self, $c, ...); You have a few options. If the method has no need for $c, just do $self->subroutine(). If it needs access to $c, you have two opt

Re: [Catalyst] base controller

2007-05-31 Thread Matt S Trout
On Thu, May 31, 2007 at 02:47:06PM +0300, Octavian Rasnita wrote: > Hi, > > I want to use some subroutines in more controllers, and I think the best > idea would be to create a base controller that contains those subroutines. > > Is it a good idea to create a > MyApp::Controller::Base > which is

[Catalyst] base controller

2007-05-31 Thread Octavian Rasnita
Hi, I want to use some subroutines in more controllers, and I think the best idea would be to create a base controller that contains those subroutines. Is it a good idea to create a MyApp::Controller::Base which is based on Catalyst::Controller then to use use base MyApp::Controller::Base; i