in reply to Re^3: Class::Struct - Not a CODE referemce
in thread Class::Struct - Not a CODE referemce

You are right, it happens after the accessor. Thank you - problem solved! The n-command is not intuitive in if/elsif/else constructs - at least not for me. Reading the documentation helped ;-) In case someone struggles with the same error - you probably did this:
$ref->a->($key);
but meant this:
$ref->a($key);
Cheers, Martin