On Wed, Apr 6, 2011 at 8:28 PM, Lyle <webmas...@cosmicperl.com> wrote: > For further clarification, and without looking at the H::T implementation. > You are calling it an object because in the sense of the term 'object' the > template is an object. But, it's not a Perl object, which is likely where > further confusion comes from.
Yes, it is a Perl object. A "template" is a bunch of text. An HTML::Template object is a Perl object ... new() Call new() to create a new Template object: my $template = HTML::Template->new( filename => 'file.tmpl', option => 'value' ); ... output() output() returns the final result of the template. In most situations you'll want to print this, like: print $template->output(); .. Calling output() is guaranteed not to change the state of the Template object, in case you were wondering. This property is mostly important for the internal implementation of loops. ---- http://search.cpan.org/dist/HTML-Template/Template.pm ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ Html-template-users mailing list Html-template-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/html-template-users