Hi,

On Monday 04 February 2002 12:06, Gary Varnell wrote:
> Here is an example.

[...]

> my $output = $tmpl_obj->output();
> return $output;
> }
>

Ah, that did the trick. Much obliged!

>
>
> -----Original Message-----
> From: Martijn van den Burg [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 04, 2002 3:07 AM
> To: [EMAIL PROTECTED]
> Subject: [htmltmpl] Printing template using CGI::Application
>
>
> Hi,
>
> I've just started to use CGI::Application, incorporating it in existing CGI
> apps. Loading the template with load_tmpl() works but how should I print it
> through CGI::Application's methods?
>
> C::A expects a scalar or a reference to a scalar to be returned and not a
> template object, so something like 'return $template' fails. Printing the
> template the H::T way, 'print $template->output' also fails because the
> HTTP content-type headers are printed /after/ the template was sent to the
> browser.
>
> Should I add the HTTP content-type headers to my templates or is there
> something I overlooked in C::A?
>

Martijn

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to