On Thu, 2005-01-27 at 22:52 -0500, Cees Hek wrote:
> Instead of configuring the object by
> calling $self->tt_config(...) you can now provide all the options when
> you 'use' the module.
>
> package My::App;
>
> use base qw(CGI::Application);
> use CGI::Application::Plugin::TT (
> TEMPLATE_OPTIONS => {
> POST_CHOMP => 1,
> FILTERS => {
> 'currency' => sub { sprintf('$
> %0.2f', @_) },
> },
> },
> );
As a general rule, I don't like it when modules co-opt import() for
something that is totally different from importing. I'd rather see this
done in a separate method, at least as an option.
> I've also added a method to change the INCLUDE_PATH dynamically.called
> tt_include_path (as per Perrin's suggestion).
Thanks! Hopefully that will help make more people aware that this is
allowed with TT, and they can realize some serious performance gains.
- Perrin
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates