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

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

  [% FOREACH suite = suites %]

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

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

I've tried to:

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

But I'm getting errors like:

[Tue Jul  3 11:01:23 2007] regression_builder.cgi: Reference found where
even-sized list expected at .../lib/site_perl//TestSuite.pm line 68.
Uncaught exception from user code:
        Error executing run mode 'status_menu': undef error - You must
set ENVIRONMENT (STAGE, PROD1/2/3) to save test results. at
../TestSuite.pm line 70.
 at ./htdocs/regression_builder.cgi line 27
 
CGI::Application::run('POINT::Regression::WebApp=HASH(0x833a94c)')
called at ./htdocs/regression_builder.cgi line 27
[Tue Jul  3 11:01:24 2007] [error] [client 10.2.200.120] Premature end
of script headers: ./htdocs/regression_builder.cgi

Thanks for any help you can propose.

-E.

Eric D. Berg
Lehman Brothers
> Fixed Income Research
> 745 7th Avenue, 15th floor
> New York, NY 10019
> Phone +1 212 526 8118
> 
> 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.

--------
IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this 
communication (including any attachments) is not intended or written to be used 
and cannot be used for the purpose of (i) avoiding U.S. tax related penalties 
or (ii) promoting, marketing or recommending to another party any transaction 
or matter addressed herein.



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

Reply via email to