[Templates] LOAD_PERL parameter
Stuart Johnston
saj at thecommune.net
Mon Jun 23 20:25:32 BST 2008
Keddie, Diane wrote:
> When creating a template object, the default for the LOAD_PERL
> configuration parameter is 0. According to the template toolkit manual,
> this option can be set to 1 to allow you to load regular Perl modules as
> plugins. Is there any disadvantage to changing the LOAD_PERL
> configuration parameter to 1? Would it affect performance? Any reason
> why the default is 0?
There shouldn't be any affect on performance. The reason it is off by
default is that it breaks down the separation of concerns.
If you just want to load some modules, you can probably use the Class
plugin. http://search.cpan.org/perldoc?Template::Plugin::Class
For something more complex than that, you should create the objects in
your calling Perl and pass them into the template.
More information about the templates
mailing list