Subject: | tt_process doesn't handle zero arguments |
I realize that your documentation says that tt_process accepts one or
two parameters, but I couldn't see a reason why it couldn't accept zero
parameters--i.e. you have no arguments to pass to the template and you
want the name auto-generated. Only a slight modification to the
tt_process method is required. I've attached the patch for v. 1.01.
Here's the new relevant section in tt_process:
if (! defined($vars) && (Scalar::Util::reftype($file)||'') eq 'HASH') {
$vars = $file;
$file = undef;
}
$vars ||= {};
$file ||= $self->tt_template_name;
my $template_name = $file;
Thanks for a very useful module.
Cheers,
Brad
Subject: | TT.patch |
241c241
< $file = $self->tt_template_name;
---
> $file = undef;
243a244
> $file ||= $self->tt_template_name;