XP is just a number | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Without regard to how it's actually implemented, I want to say that I like the idea of using the :Field attribute to declare instance data.
As for the source filter, I wonder if maybe you could use AUTOLOAD to generate the accessors when/if they are first used? The :Field attrib would store a reference to the hash and its name, and the generator would look it up to see if that name existed, without worrying about the scope of the underlying declared hash. A benifit of the inside-out approach in general is that names of instance data can be reused in derived classes without conflict. I don't understand your DESTROY. You define $class on one line to be my blessed class, then define it again on the next line to be every key in the Values hash. Isn't this going to destroy all classes? That is, don't you want a single $values=$Values{$class}, rather than iterating over all $Values? —John In reply to Re: Class::InsideOut - yet another riff on inside out objects.
by John M. Dlugosz
|
|