[Catalyst] includes in catalyst
John Napiorkowski
jjn1056 at yahoo.com
Tue May 22 23:05:59 GMT 2007
--- John Goulah <jgoulah at gmail.com> wrote:
> Is it better to put module "use" statements within
> each controller class
> they are used in, or at some more global level , and
> if so where is
> suggested?
>
>
> Thanks!
> John
The general consensus is that you should use a module
where it's needed, not in a global area. You can
however create your own base controller, inheriting
from Catalyst::Controller, that uses everything for a
particular task that you reuse in multiple
controllers.
If the package you are including is very data oriented
you can consider wrapping it in a model class.
Not recommended is creating a plugin just to expose
some common functionality.
--John
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Catalyst
mailing list