[Chicago-talk] super complex object

JT Smith jt at plainblack.com
Thu Aug 4 06:49:30 PDT 2005

> If a lot of classes need to add data into a
> central object look up NEXT::init, that is
> exactly what it's designed for. The derived
> class's constructor passes its new object
> through the inherited initializers to get a
> composite data structure (hash or array,
> I'm about to add hash-of-arrays). This can
> also be used to assemble fairly complicated
> data structures or dispatch tables.
> One approach to this situation is Tim Bunce's
> trick in DBI: use a local hash for metadata.
> In that case you have a lexical meta hash for
> the object within each class for its private
> stuff (destructor does a delete $meta{$obj})
> and the shared portion lives in the object
> itself. That at least encapsulates what you
> consider public from any private data. This
> also protects the users if they want to store
> any of their own data in the object since they
> are less likely to overwrite something useful.

I really wish I understood anything you just said. I read over the documentation for 
NEXT::init and still have no idea what it would be used for. I think it's the fact that 
I'm self taught so don't understand a lot of the terminology. Sorry for my ignorance.

Anyway, Jim's mixin solution will work fine for my needs. Thanks for all your effort. I 
really do appreciate it.

JT ~ Plain Black
ph: 703-286-2525 ext. 810
fax: 312-264-5382

I reject your reality, and substitute my own. ~ Adam Savage

More information about the Chicago-talk mailing list