[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] returning HTML::Templates from runmodes?


> >It depends on the implementation.
> 
> Well, the implementation I have in mind would benefit H::T users and 
> not harm anyone else :-)

Are you sure?  I'm not that strong on profiling, so I could be wrong,
but it seems like you're requiring H::T with CGI::App, which I think
Jesse _un_did a few minor versions ago.

>  my $output = '';
>     $tt->process('welcome.tt2', $vars, \$output)
>         || die $tt->error(), "\n";
> 
> This approach does not separate the generation of the template from the 
> generation of the output.

I'm not sure what this means.  The template is one file or scalar, the
output is either STDOUT by default, or another pipe, file, or scalar.

> Therefore (by allowing you to return scalar-refs), CGI::App already 
> supports T::T as much as is possible :-)

I know, I requested that feature myself :)

> But users of H::T could gain by taking advantage of the separation 
> between making the template
> (my $tmpl = new HTML::Template (.....) ) and making the output 
> ($tmpl->output(print_to=>...).

I'm not seeing what advantage you're referring to...  I'm sure you have
one, I'm just not seeing it.  Are you talking about the final scalar you
send to the template object?

-- 
SwiftOne
suppressed

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.