On Mar 02 2007, Luke Palmer wrote:
> Or I wonder if there's really a problem here that we're
> addressing, or whether we're just adding syntax because we can.
This syntax awkwardness comes up a lot in various kinds of reports.
for @records {
.print;
}
if @records {
say "Search returned no records";
}
I've always found it annoying that I have to write @records (or
whatever) twice. I don't know if Thomas's idea is the best possible but
it's not horrible. Hmm, I wonder if I could get it into Template
toolkit.
[% FOREACH records %]
<span>[% whatever %]</span>
[% ELSE %]
<span>Search returned no records.</span>
[% END %]
--
Rick Delaney
[EMAIL PROTECTED]