[Catalyst] Setting Template Tookit WHILE_MAX from Catalyst
J. Shirley
jshirley at gmail.com
Mon Jan 26 22:54:28 GMT 2009
On Mon, Jan 26, 2009 at 1:57 PM, Kutbuddin <ksdoctor at burnham.org> wrote:
>
>
> OK.. so how?
> I tried :
> __PACKAGE__->config({
> CATALYST_VAR => 'Catalyst',
> INCLUDE_PATH => [
> subs->path_to( 'root', 'src' ),
> subs->path_to( 'root', 'lib' )
> ],
> PRE_PROCESS => 'config/main',
> WRAPPER => 'site/wrapper',
> ERROR => 'error.tt2',
> TIMER => 0,
> WHILE_MAX => 100,
> });
>
>
> and also
> 'Directive::WHILE_MAX' => 100, (substitute for line above)
>
> both had no effect!
>
> The Catalyst::View::TT perldoc says to set config options in lib/MyApp.pm,
> however, these are in lib/MyApp/View/TT.pm but seems to be doing the same
> thing.
>
> The config passing code is little difficult to follow, so perhaps an expert
> tell me what I am getting wrong..
>
> thanks,
> -Kutbuddin
>
>
>
This is not a configuration option, it is a perl variable. You set it
like any other perl variable:
package MyApp::View::TT;
use Template;
$Template::Directive::WHILE_MAX = 100;
... rest of your code ...
1;
This is just perl, nothing else. No magic.
-J
More information about the Catalyst
mailing list