[Catalyst] Catalyst future again

Sebastian Riedel sri at oook.de
Fri Sep 2 18:49:17 CEST 2005

Am 02.09.2005 um 06:42 schrieb Drew Taylor:

> On 9/1/05, Sebastian Riedel <sri at oook.de> wrote:
> * Andy Wardley spent some time improving the TT view and on a new  
> helper named Catalyst::Helper::View::TTSite.
>   The helper is much more verbose than the default one and creates  
> "everything" you need for a TT powered Catalyst app (templates,  
> macros, directories...), i'm sure all advanced TT users will love it.
> I tried this out tonight and wasted several hours trying  
> unsuccessfully to get it to work. Here's what I found:
> 1) The TTSite helper creates the template in $appdir/templates,  
> while the generated view (MyApp::V::TT) was setting INCLUDE_PATH to  
> ["$appdir/root/templates/lib", "$appdir/root/templates/src"].  
> Needless to say this caused problems. :-)
> 2) I never could get the wrapper to work. I tried all three methods  
> mentioned in the docs to set the various options for Template. I  
> even tried using the Singleton plugin to get the context at the  
> class level and do the configuration there.
>   package MyApp::V::TT;
>   use base 'Catalyst::View::TT';
>   use MyApp;
>   my $root = MyApp->instance->{root}; # caused error because  
> instance() returned undef;
>   __PACKAGE__->config({INCLUDE_PATH=>["$root/templates/lib", "$root/ 
> templates/src"]});
> It appears that the INCLUDE_PATH was never making it to Template.pm  
> because if I put welcome.tt2 into $root that single template was  
> rendered (no wrapper, styles, etc). I'd love to be able to use the  
> new TTSite helper, but I'm not familiar enough with internals to  
> debug where the config is going wrong.

Fixed now.
I made some typos and Template::Timer doesn't work with PRE_PROCESS.


More information about the Catalyst mailing list