[Catalyst] context in ::V::TT::new()
luke.saunders at gmail.com
Tue Jul 19 15:31:05 CEST 2005
Somewhat off topic: It seems to me that it might be useful to have
some sort of context like object available at app start. Currently the
only place to store objects at that level is in MyApp->Config though
that seems unclean to me as objects stored may not be config related.
Another reason for some sort of app level object is to have access to
some debug methods (like $c->log->debug) before a request is made.
One of the next things on my list is to look into Catalyst plugins and
what they are capable of, so it maybe that I could achieve what I want
by writing one of those.
Would be interested to hear your thoughts.
On 7/18/05, Sebastian Riedel <sri at oook.de> wrote:
> Am 18.07.2005 um 21:42 schrieb Michael Richards:
> > Hello,
> > I'm overriding the new subroutine in a Template Toolkit as
> > described in Tutorial.pod in the "Hooking in to Template Toolkit"
> > section. Is it possible to access the context object from here? I'd
> > like to get to the stash to figure out which wrapper template to use
> > but it doesn't see that the context object exists here. Any tips or
> > pointers would be greatly appreciated.
> new() gets called on app startup...there is no context at that time. ;)
> If you need a global context object at runtime there's always
> Catalyst mailing list
> Catalyst at lists.rawmode.org
More information about the Catalyst