I'm going to have to read this more carefully later, but
I just want to clarify what I was suggesting.
- First, use BaseClass qw(Foo) would be only
one way to handle inheritance. BaseClass would use all of
the items in @ISA at that point to determine attributes (as you suggest)
but it would also be smart enough to look at that "Foo" in
its @_. In other words, your mechanism for dealing with inheritance would still be there; my suggestion
would simply provide another way to do it, one that's imho a lot simpler. But my approach wouldn't be mandatory, but
optional.
- Similarly, since any given module is going to have
only one call to define_attributes (is that correct?), it makes sense to me that it be part of the use call. If an anon. hash is not on the use BaseClass line, BaseClass would defer setting up attributes, leaving it to a define_atttributes call later in the module. There'll be more than one way to do it.
I think I'm not questioning the underlying ideas of your
approach, but rather, I'm suggesting a simplified user interface towards invoking it. Or if not simplified, then
in keeping with currently existing Perl modules that already get a lot of use and that imho have good interfaces.
Oh, and just I gotta say: I really hate the idea of having to type "SCALAR" et al. Perl already has the sigil set - why duplicate them? (Except in a 'use English' way, but again, that should be an optional WTDI.)
-- Frag.