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


in reply to When is a module too minimal?

As noted, there's nothing wrong with what you've done. Here's a bit more for you to think about.

You've written a class with one constructor and one method. A class has a dual role. First, it must provide everything it needs to provide. That is to say, it must be "complete" and that tends to increase its size. However, a class is also frequently an element of code reuse and then it should be as small as possible. Thus, you have competing pressures on the classes and this can cause difficulties with design.

If you have a small class which does everything you need to do, you really don't have as much worry about that competing pressure and this is a good thing. And if you're really, really crazy, you can read a bit more about the problem and strengths and weaknesses of various solutions to it.

Cheers,
Ovid

New address of my CGI Course.