# from Paul LeoNerd Evans
# on Monday 05 February 2007 03:07 pm:

>I notice while looking around CPAN that there are about 6 million
>Variations On A Theme By Bach^W^Wof Class::Accessor. Does anyone have
>anything of note to say on any of them?

Well, you have the basic accessor-only approach of Class::Accessor and 
such, and then I'm sure there are a few "that, but with validation" 
modules and probably some that could be mix-n-matched.  After that 
comes metaclass hacking with Class::MOP, Class::Meta::Express, or a 
full-blown object system + metaclass manager like Moose.

Of course, you want all of the features, right?  The catch is that the 
full-blown system is still evolving and while it is improving in leaps 
*and* bounds, last I checked it was still slow (though that was not 
today, so YMMV.)

<shameless>
So, my current code all uses Class::Accessor::Classy, because I decided 
to keep it simple, quick, and "not in my way" until the time comes that 
I can afford validation and etc.  C::A::C is very much "just the 
accessors, thanks", but without unrequested subclass methods getting in 
the way in your class hierarchy, plus you can override the accessors 
and have $self->SUPER::set_foo($foo) work.
</shameless>

After-all, accessor methods are just placeholders.  Isn't that how 
python and ruby do it?

--Eric
-- 
"Everything goes wrong all at once."
--Quantized Revision of Murphy's Law
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to