[ Moderator, please delete message similar to this one, but from
an unsubscribed email address. ]
Hi tt fans,
If I try to sort a list with only one value, that value gets lost. Here is a simple
example which shows the problem.
<begin code>
use strict;
use Template;
sub get_colors {
my @items = ("red");
return @items;
}
{
my $template = Template->new;
$template->process( \*DATA,{colors => \&get_colors}) ||
die "No process: ", $template->error();
}
__DATA__
Works fine:
[%FOREACH color = colors %]
hello : [%color%]
[%END%]
Can't sort (outputs nothing):
[%FOREACH color = colors.sort %]
hello : [%color%]
[%END%]
<end code>
Is this a known subtlety?
regards,
Brian