[Catalyst] Setting the COMPILE_DIR for TT templates in the configuration file

Robert Rothenberg robrwo at gmail.com
Sun Jan 22 20:16:54 GMT 2012

On 22/01/12 19:58 Tomas Doran wrote:
> On 22 Jan 2012, at 18:54, Robert Rothenberg wrote:
>> <View::TT>
>> COMPILE_DIR /var/opt/myapp/template_cache
>> </View::TT>
>> where MyApp::View::TT is the name of the view module.
>> None of them work. How do I do this?
> This should work.
> http://localhost:3000/?dump_info=1
> will dump the config that the app has actually read in and merged (assuming
> you've got debug mode on and you're using the standard RenderView plugin).
> Does the config dumped look like you expect? Can you show us?

It doesn't quite look like what I expect. Excerpts:

"Plugin::Session"                     => {
                 storage => "/tmp/myapp/session",

 "View::TT"                        => {
                 COMPILE_DIR => "/tmp/myapp/template_cache",

Those are the defaults that are set in the module. I want to override them
in the conf file.

But setting in the conf file:

  storage /var/opt/myapp/session

or similarly for <View::TT> does not change those values. (I know setting
other things such as the DSN in the conf works, so it's the right file).


> Are you customising your TT view in any way (i.e. adding extra code yourself
> - specifically to the constructor). Do you have a make_immutable in there?
> (Can you show us the whole file?)
> Cheers
> t0m
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/

More information about the Catalyst mailing list