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

Replies are listed 'Best First'.
Re: Re: Class automators should be standard
by theguvnor (Chaplain) on Jan 14, 2004 at 14:38 UTC

    Arunbear asked how you do OOP in Perl without bless; I'd much rather know why you think it is important to know how to do that.

    Update: looks like hardburn already answered the question.


A reply falls below the community's threshold of quality. You may see it by logging in.