Hi Eric -- > I have been talking with the other tech guy where I work about > CGI::Application. It looks like we are going to be using it along with > HTML::Template. > I am having a problem understanding how HTML::Template is used with > CGI::Application though. Looking at the example mailform.pm > I see,
CGI::Application::Mailform does not actually use HTML::Template. However, it is a good example of the basics of how to write a CGI::Application-based module. The CGI::Application POD is also good for that. Finally, there is an article on Perl.com I wrote about a year ago which should help you get a handle on it: http://www.perl.com/pub/a/2001/06/05/cgi.html > But I am suppose to execute $template->output to print html from HTML > template. That is exactly right. A typical run-mode with HTML::Template looks like this: sub some_run_mode { my $self = shift; my $t = $self->load_tmpl('just_a_basic.tmpl'); # ...populate the HTML::Template object here $t->param('some_var', '123abc'); $t->param('some_loop', [{thing=>1}, {thing=>2}, {thing=>3}]); return $t->output(); } > So I am confused and don't really know where to begin. > I get the pieces but not how to put them together. The short term > goal, is > to make a new run mode that will show a filled in version of the > html form > for double checking before being sent, but to also use tmpl for the html. That should be pretty straight-forward. You can get access to the CGI.pm query object through the query() method, and use HTML::Template's param() method to set variables in the output page. Hope that helps! TTYL, -Jesse- --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@lists.vm.com/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]