hi all,
i am looking for some help with the following problem:
i have been trying to create a hash whose keys are objects. for this i
use (more or less) the following perl code:
my $obj = new My::Object;
my %tt_vars;
${$tt_vars{myhash}}{$obj} = 1; # so $tt_vars{myhash} is a hashref now
then in my template i try:
[% myhash.keys.0 %]
and i correctly get as output:
My::Object=HASH(0x9623a2c)
but, when i try in the template to access an object method like:
[% myhash.keys.0.id %]
i get an error in my logs:
"don't know how to access [My::Object=HASH(0x957bf20) ].id"
"id" is a valid method of My::Object so the problem doesn't lie there.
does anyone have a clue what the problem is? or is it just impossible to
use objects as hash keys?
thanks a lot,
giorgos