[Catalyst] modifying the template include_path from the application base

Thomas Hartman tphyahoo at gmail.com
Tue Mar 14 17:57:33 CET 2006


In the first version of the code you are calling

TToolkit->config

In the second you are calling

Commencement->config

and then apparently hoping that setting the hash deeper in will have
the same effect as the first bit of code.

I'm not that versed in catalyst, but I wouldn't expect these to
necessarily do the same things. If there is some reason that this *is*
the expectation, I would welcome enlightenment...

thomas.


2006/3/10, marcus baker <marcus.baker at gmail.com>:
> 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.
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>



More information about the Catalyst mailing list