[cgiapp] [patch] CAP::MessageStack + CAP::FormState
Alex
capfan at gmx.de
Tue Oct 20 16:25:17 EDT 2009
True, I didn't consider other hooked methods. They may depend on getting an
unparsed template to be able to fill in their stuff.
Abandoning this theory, I still think it's better to provide a slow
solution, with the documentation on how to speed it up, rather than a
solution that causes apps to die, with the documentation on how to get it to
work. The reasons why I prefer the first solution still hold.
Regards, Alex
-----Ursprüngliche Nachricht-----
Von: cgiapp-bounces at lists.openlib.org
[mailto:cgiapp-bounces at lists.openlib.org] Im Auftrag von Michael Graham
Gesendet: Dienstag, 20. Oktober 2009 21:59
An: cgiapp at lists.openlib.org
Betreff: Re: [cgiapp] [patch] CAP::MessageStack + CAP::FormState
> Considering the multiple parsing of the template: what if I would
> override the tmpl_file to the parsed output?
>
> sub _pass_in_messages {
> my ( $self, $ht_params, $tmpl_params, $tmpl_file ) = @_;
> ...
> $tmpl_file = \$t->output(); # ?
> }
How would that work? The next load_tmpl hook in the chain would get a
string of html text with all of the HTML::Template tags filled in (or left
blank). It would still have to parse the template again, except there would
be nothing to parse.
If anything, there should be a way of passing the template object itself
from one hooked sub to the next.
But this is problematic because each templating system uses its own
syntax...
Michael
--
Michael Graham <magog at the-wire.com>
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://lists.openlib.org/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://lists.openlib.org/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################
More information about the cgiapp
mailing list