However, the values are not being passed back to the Template. Or, if they are, they are not getting displayed.
Here is an SSCCE to demonstrate looping over the return values:
#!/usr/bin/env perl use strict; use warnings; use Template; sub baz { return qw/there World/; } my $v = { bar => \&baz }; my $t = join '', <DATA>; Template->new->process (\$t, $v); __DATA__ [% FOREACH foo IN bar() %] Hello [% foo %]! [% END %]
🦛
In reply to Re^5: Preparing data for Template
by hippo
in thread Preparing data for Template
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |