Hello to all
I am working on an application that uses template toolkit and perl running under plack. Here is my issue:
in standard perl/tt under CGI I was able to process a incrementing structure by loading up an array and the processing it through tt as:
sub new {
my $class = shift;
my $self = {};
bless ($self, $class);
$self->_init( @_ );
return $self;
}
sub _init{
my ($self,%p) = @_;
$self->{container} = [];
}
then down in the code
get db record - $rec
push @{$self->{container}}, $rec;
my $output = ''
$form->{array} = $self->{container};
$tt->prosess("$template,$form,\$output);
under plack - the $self->{container} only gets the most recent $rec - it is like the array ref is lost and it starts fresh each time.
Can anyone give some guidance in this or examples of using template toolkit under plack.
Thanks to all.