RE: [htmltmpl] placing .tmpl files in a subdirectory?
Brought to you by:
samtregar
From: Philip S T. <phi...@gm...> - 2002-07-03 05:34:48
|
On Tue, 2 Jul 2002, Roy Rubin wrote: > > my $t = new HTML::Template(filehandle => *DATA); > > > > then, you just put your template in the source file itself, either after > > __DATA__ or after __END__ > > > > Can you provide a more detailed example well, I've never tried it myself, but it would look something like this: #!/usr/bin/perl -w use strict; use HTML::Template; my $t = new HTML::Template(filehandle => *DATA); # do normal template processing here __DATA__ <html> <head><title><tmpl_var title></title></head> <body> <h1><tmpl_var title></h1> <p> Hello <tmpl_var name>. </p> </body> </html> |