If you use the caching options of H::T, then wont need to care where you call new(), as H::T will automatically use a previously parsed version of the template from the cache, ie. the impact of call new() on a previously parsed template, is nearly zero.
Read up on the caching options within the H::T perldoc; you should find one of the type which would suite your application environment. regards, Mathew > Wondering if anyone has input regarding the use of: > > HTML::Template->new > > It would seem (to me) that from a performance standpoint, > only calling a template as it is needed is the most efficient > approach. > > My question has to do with the actual impact of > HTML::Template->new > > In a script, when I only use a given template one time, > I only call it in the one location where it's needed > > When the template is used globally (every time the > script is fired off), I call the template at the beginning > of the script - one time. > > My question has to do with templates that are potentially > used in many areas of the script, even though only once. > In other words, there may be various ways the script > can be triggered that will require a given template (and > many ways the script can be called where the template > isn't needed). > > To avoid code clutter, what I'd like to do is call all my > templates in one spot: > > my $temp1 = HTML::Template->new( etc ... > my $temp2 = HTML::Template->new( etc ... > my $temp3 = HTML::Template->new( etc ... > > But my concern is that the approach would not > be "server friendly". That said, I'm thinking that the overhead > for template calls is so small, I need not be concerned. > > Hopefully, some on the list can enlighten me. > > Carl Hagstrom > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Html-template-users mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/html-template-users > ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users