[Catalyst] context in ::V::TT::new()

Michael Richards mdrichards at gmail.com
Tue Jul 19 00:35:51 CEST 2005


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::Plugin::Singleton.

Ahh, of course. That makes perfect sense.

Thank you.



More information about the Catalyst mailing list