I was going through the solutions to the expert
Perl Quiz of the Week when I came across
Mark Jason Dominus'
commentary regarding the
Mail::Box::MH module. To wit, he states:
That sounds like a joke, doesn't it? Say "use Mail::Box::MH" and you
load *seventy* modules.
I tend to agree that loading seventy modules seems a little
excessive; however, where do we define the cut-off point? The common
refrain in most
programming circles is to re-use a module rather than write your own.
The Mail::Box::MH module obviously adheres to this mantra,
since it pulls in seventy helper modules.
As another example, I use the
Class::DBI module all the time when doing database work.
Class::DBI uses thirty-two modules. For what
Class::DBI does, I feel it's a fair trade-off.
As an aside, eight of the required modules are actually part of Class::DBI
itself, so we should count that as one module. That still leaves twenty-five
other required modules. I also do not consider the base,
strict, vars, and warnings modules as
problematic since virtually every Perl module will include this
modules. Therefore, there are still twenty-one other modules required
perl -l -MClass::DBI -e 'print join "\n", keys %INC' | sort | uniq
What do other monks think? How many modules can one module
require before it is considered too many?
Given the speed of today's computers and the amount of memory they
have, is this question academic?