in reply to CGI::Ajax + Template::Toolkit Question
It may be that CGI::Ajax expects build_html to return the html (or updated html) for the page. However, by default, $tt->process($template, $vars) will print the processed output to STDOUT. Try something like the following:
which will stuff the processed template into $output.sub main_page { my $output = ''; $tt->process($template, $vars, \$output) || die $tt->error(), "\n"; return $output; }
In Section
Seekers of Perl Wisdom