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

Sebastian Riedel sri at oook.de
Mon Jul 18 23:27:26 CEST 2005


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.

--
sebastian




More information about the Catalyst mailing list