On Thu, 20 Mar 2003, Benjamin C. Bangert wrote:

> Hi all,
> 
> I decided to start using Template Toolkit for a variety of reasons instead
> of HTML::Template which is integrated into CGI::App. I encountered a
> strange bug but am not entirely sure what caused it. Here's what my code
> looked like using HTML::Template inside one of the run-mode handlers.

...

> While this solution does work, I was wondering if anyone knows why I
> couldn't directly return the template process output. Anyone else using
> Template Toolkit with CGI::App have any suggestions or other tips using
> this combo?

That's how Template works, the documentation says so. 
The third argument to process can be:
nothing: it gets sent to STDOUT
file name: it creates the path and the file and writes to it
scalar reference: it is passed into the ref
sub reference: it is passed as the first argument to the sub
filehandle glob: it is written to that file handle

http://search.cpan.org/author/ABW/Template-Toolkit-2.08/lib/Template.pm#process_template_vars_output_

I wrote subclassed CGI::Application for that purpose and my load_tmpl
looks basically your last option so that it works like the original.

I've been thinking about releasing it to CPAN but maybe in a week or 
so. I'm still learning the MakeMaker.


Clayton

 




---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to