Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-TT CPAN distribution.

Report information
The Basics
Id: 17377
Status: resolved
Priority: 0/
Queue: CGI-Application-Plugin-TT

People
Owner: Nobody in particular
Requestors: brad [...] footle.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.01
Fixed in: (no value)



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;
Fixed, and will appear in version 1.02