[Catalyst] modifying the template include_path from the application base

marcus baker marcus.baker at gmail.com
Fri Mar 10 00:06:46 CET 2006


Hi, I'm just dipping into Catalyst for the first time, and having
trouble modifying the Template Toolkit's INCLUDE_PATH as directed in
the Tutorial.

My application is named 'Commencement', and my Template Toolkit view
is implemented through Commencement::View::TToolkit.

I'd like to have my templates accessible via the 'templates' directory
as per the tutorial.  It works if I place the config directive in
TToolkit.pm as such:

__PACKAGE__->config( { INCLUDE_PATH => [
Commencement->path_to('templates') ] } );

However it doesn't work if I try to call config directly from my
Commencement.pm:
__PACKAGE__->config({
    name => 'Commencement',
    root => __PACKAGE__->path_to('root'),
    'View::TToolkit' => {
                         'INCLUDE_PATH' => [ __PACKAGE__->path_to('templates') ]
                         }
                     });


Is there something obvious I'm missing here?

This is in the most recent version, 5.65.



More information about the Catalyst mailing list