Re: [htmltmpl] More CGI.pm in HTML::Template
Brought to you by:
samtregar
From: Philip S T. <phi...@gm...> - 2002-07-02 05:51:53
|
On Mon, 1 Jul 2002, Will wrote: > Supposing a script using both CGI.pm and > HTML::Template... would the following be a functional > assignment (such that the WHATEVER could be used in > the .tmpl file)? > > $template->param(WHATEVER=>$CGI->param("blah")); yes, this is correct, but not what is normally done. you'd be better off doing an associate: my $template = new HTML::Template( filename => 'template.tmpl', associate => $CGI ); which will do the above for all cgi variables. Use your method only if you want just one or two cgi vars sent to the template. |