in reply to Too Many Ways To Do It
is not as good as:sub Send_Header { my $header_tmpl = HTML::Template->new( filename => 'header.tmpl' ); $header_tmpl->param(...); ...
since in the latter version, you only create the tmpl variable once. I'm not sure how cache'ing works in HTML::Template, for but Template Toolkit 2, for example, this can be very important; if it only has to cache once, that's a significant CPU savings.my $PACKAGE::header_tmpl = HTML::Template->new( filename => 'header.tmpl'); ... sub Send_Header { $PACKAGE::header_tmpl->param(...); ... }
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
It's not what you know, but knowing how to find it if you don't know that's important
|
|---|