What are you trying to achieve with this approach?
I don't have any particular goal in mind, mostly experimentation. 6 months ago perl objects were something weird where you had to use $foo->bar('baz') in some people's modules. I didn't understand how it worked. Then I learned a bit more. Then I understood the blessed hashref approach. Now I'm trying to get creative, that's all.
Re^2: inside-out objects using arrays?
Download Code Replies are listed 'Best First'.
Cool. Experimentation is a good thing in my book. If you haven't picked up a copy of Object Oriented Perl, I do recommend it as a guide to your experimentation. It doesn't cover some of the newer ideas we're talking about here, but the fundamental concepts and thinking all apply. Also, you may find a wealth of useful ideas in the Perl Design Patterns book/wiki. Best of luck,
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.