Oh guys, thanks a lot!
I'm looking at Class::Struct... well, it seems to be understandable :) and furthermore I can use it to solve another problem I have here...
An undocumented Class::Struct trick I learned by reading the source, is to call Class::Struct::printem(1);. You can now see the generated code.
Definitely take the time to really grok the references documentation others have pointed you to. Mastering this material is key to moving to the next level.