http://www.perlmonks.org?node_id=321127


in reply to Class automators should be standard

No. While I'm not going to say using MethodMaker is always bad, it would encourage those new to OOP to design sloppy objects (such as accessors and mutators on every attribute). Further, it only teaches you one aspect of Perl OOP. There are already too many people who limit themselves to bless alone, and with MethodMaker, they wouldn't even learn that much.

If you happen to like MethodMaker, know how bless works already, and already understand why you should limit the use of accessors/mutators, then go ahead and use MethodMaker. I just don't want coders encouraged into bad practices too soon. There's quite enough of that as it is.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated