in reply to RE: RE: Power of single objects
in thread Power of single objects

Hmm.. Maybe one of us is misunderstanding the other.. I have no problem with modules, I just have a problem with the overuse of OOP in cases where it just adds complexity without any benefit. Consider some module "Object", which has the sole task of performing some_operation on $item, the behavior of which could change, depending on the value of some_variable.
use Object; my $obj = new Object; $obj->some_operation($item); $obj->some_variable($argument); $obj->some_operation($item); # versus use Object; some_operation($item); some_operation($item, $argument);
In my opinion, there are many types of modules that, for whatever reason, unnecessarily go with an OO approach, even though the paradigm doesn't quite fit, and we get little benefit out if it. I really don't know how to describe the best way to decide. For me, I just look at my package in both ways. If it "feels" right in an object point of view, if I can see a benefit to creating multiple "instances" of my module in the form of objects and toss those around, I'll build it in OO style. If my resulting implementation is going to be a lot more efficient and simpler in a functional style, I'll go that route. Perhaps it's just personal preference...