>>>>> "Berg," == Berg, Eric <[EMAIL PROTECTED]> writes:

Berg,> I'm traversing a hierarchy, and need to get one object from another from
Berg,> within a template.   I'm having difficulty passing in parameters to my
Berg,> instance method from the template.  Here's some code to explain:

Berg,> I have an array of "suites" from which I get an individual "suite":

Berg,>   [% FOREACH suite = suites %]

Berg,> I need to get a "suite_runner" from the suite which I do in regular perl
Berg,> code like so:

Berg,> my $runner = $suite->get_runner(ENVIRONMENT => 'PROD');

Berg,> I've tried to:

Berg,> [% runner = suite.get_runner(ENVIRONMENT => env) %]

That's probably turning into the equivalent of:

  $suite->get_runner({ ENVIRONMENT => env });

You'll need to call

  [% suite.get_runner('ENVIRONMENT', env) %]

instead.

Just guessing, but I think I got bit by that one once.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to