On 26 Jan 2009, at 19:50, Kutbuddin wrote:
Hi,
I would like to know how to set the TT variable :
$Template::Directive::WHILE_MAX
from within Catalyst.. maybe as part of the site View configuration in
lib/MyApp/View/TT.pm
or similar
By default the maximum for a while loop is 1000.
This isn't actually a config setting - you have to override the
global variable.
The correct way to do this is in MyApp::View::TT:
use MRO::Compat;
sub process {
my $self = shift;
local $Template::Directive::WHILE_MAX = 10000; # Or whatever you
want
$self->next::method(@_);
}
Cheers
t0m
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/