water has asked for the wisdom of the Perl Monks concerning the following question:
In the template, I want to do thismy @data = (1, 2 ,3); my $object = Foo->new; # object supports method 'compute' $tt->process('template.tt', {data=>[@data], object=>$object});
but [% object.compute(d) %] generates nothing. Can any TT gurus please advise?[% FOREACH d = data %] The datum is [% d %] and the computed result is [% object.compute(d) % +] [% END %]
Thank you for the help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Template: calling a method
by lachoy (Parson) on Mar 23, 2004 at 17:11 UTC |