Good day,

[ I am not subscribed to the list. Please CC me in any
  replies. ]

Sorry to bother you. I am new to Embperl. Maybe this
has been addressed before, but I did not find it in
the documentation, the archives, or via a web search
engine.

I am developing a page that makes use of a dynamic
table. I am using an array reference. Each element in
the array is an object. Thus, I coded something along
the lines of:

<table>
<tr><td> $arrayref->[$row]->method </td></tr>
</table>

The problem is that this results in an error in the
log  of "Can't call method "method" on an undefined
value". I would have expected it to work. I thought
Embperl would have parse the expression an extracted
"$arrayref->[$row]", determined whether it results in
an undefined value, and stopped or continued based on
that result.

Instead is appears embperl evaluates the whole
expression resulting in the perl error before it
decides whether insert a table row. I had to modify
the code to something like:

<table>
<tr><td> $arrayref->[$row] ? $arrayref->[$row]->method
: ''</td></tr>
</table>

which results in correct output but is rather
cumbersome.

Is this a known issue? Is there a cleaner workaround?

Thanks.



__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to