[Templates] Calling class methods with parameters from templates
Berg, Eric
eric.berg@lehman.com
Tue, 3 Jul 2007 11:10:06 -0400
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 =22suites=22 from which I get an individual =22suite=22:
=5B% FOREACH suite =3D suites %=5D
I need to get a =22suite_runner=22 from the suite which I do in regular perl
code like so:
my =24runner =3D =24suite->get_runner(ENVIRONMENT =3D> 'PROD');
I've tried to:
=5B% runner =3D suite.get_runner(ENVIRONMENT =3D> env) %=5D
But I'm getting errors like:
=5BTue Jul 3 11:01:23 2007=5D 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
=2E./TestSuite.pm line 70.
at ./htdocs/regression_builder.cgi line 27
=20
CGI::Application::run('POINT::Regression::WebApp=3DHASH(0x833a94c)')
called at ./htdocs/regression_builder.cgi line 27
=5BTue Jul 3 11:01:24 2007=5D =5Berror=5D =5Bclient 10.2.200.120=5D =
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
>=20
>=20
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =
- - - - - - -
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.