On 11/10/01 4:47 PM, Ade Olonoh wrote: >> My base class does almost nothing. It requires hash-based objects; it >> provides very loose conventions for cascading initialization; and it >> auto-creates simple scalar accessors via AUTOLOAD. > > See Class::Accessor (http://search.cpan.org/search?dist=Class-Accessor). It > seems very similar to what you've mentioned.
That is very similar, and I didn't find it earlier (dunno how I missed it...) My module is a bit different in that accessors are created "on demand" when an attribute is accessed, rather than all at once when the module is loaded. I don't handle multi-valued attributes and don't use the double-method-call technique found in Class::Accessor (what I do is more like Class::Accessor::Fast). I also provide a simple convention for cascading initialization via an init() method, and automatic named-parameter handling in new(). I think there's room for one more, slightly different "little object base class" (but still don't know what to call it) How about you? :) -John
