Hi,
>
> However when I try using an Embperl dynamic table (as
> desired) like the following:
>
> <table>
> <tr>
> <td>[+ $facets[$row]->facet_name +]</td>
> </tr>
> </table>
>
> I get an error:
>
> [1381]ERR: 24: Error in Perl code: Can't call method
> "facet_name" on an undefined value at
> /usr/local/mylibrary/index.epl line 17.
>
Embperl iterates through the array until the expression inside the [+ +]
is undef.
So in your case it iterates past the end of the array, which cause the
$facets[$row] to be undef and therefor you will see the error.
You can write
[+ eval { $facets[$row]->facet_name } +]
, but this will also disable real error messages
So the real solution would be
[+ $facets[$row]?$facets[$row]->facet_name:undef +]
In such cases I prefer to use the foreach loop...
Gerald
** Virus checked by BB-5000 Mailfilter **
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]