C. Chad Wallace wrote:
> Oh, I didn't see a reply from him; I'd be interested in
> learning what he suggested.
>
> Oh... he didn't--*gasp*--reply off-list... DID HE!? :-)
>
> On some mailing lists, people are publicly drawn and
> quartered for replying off-list.
*blush* oops...
Here's what I told Daniel:
---Message Follows---
Daniel, if I'm not mistaken, a FILTER is explicitly designed to operate
on text. It is not a function to which any type of argument may be
passed. So your hashref is being treated as a scalar "string" when
passed to your filter.
If you have a function you would like to make available within a
template, you can pass a subroutine reference in the variables hash:
### code ###
$template->process( 'test.tt2',
{
participants => [EMAIL PROTECTED], # note the backslash here!
flt_my => \&my_filter, # and here!
}
);
### template ###
[% FOREACH participant IN participants %]
Participant: [% participant.primary_key %]
[% FOREACH service IN participant.services %]
[% flt_my(service) %]
[% END %]
[% END %]
Don't forget the backslashes in your variable hash; you must pass
references for non-scalar vars, or your hash will look funny to perl.
Hope this helps.
Jason
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates