|go ahead... be a heretic|
Setting HTML::Template options after new()by Cody Fendant (Friar)
|on Apr 21, 2010 at 01:07 UTC||Need Help??|
Cody Fendant has asked for the
wisdom of the Perl Monks concerning the following question:
I've got some code where I create an HTML::Template object at the top, and then later on, may want to use the options loop_context_vars or global_vars depending on conditionals.
There's nothing in the POD about doing it that, way. But by dumping the HTML::Template object, I could see that these could be accessed like this:
interestingly, it works for loop_context_vars but not global_vars
Is there a reason for this? Can I do it a different way? Or alternatively, should I just turn them both on, even if they're not needed, and not try and do it conditionally? I was just being naturally conservative about turning on features which wouldn't be needed, that's all. Is there any kind of speed or performance implication to using these features?