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?

Before answering the question, I think the question is missing at least one other dimension: the environment in which the module is being used. And if we're distinghuising environments, I'm thinking basically two groups: load,run x 1,quit (basic maintenance scripts, CGI scripts) and load,run x N,quit (persistent environments such as mod_perl).

Many CORE modules use AutoLoader, because it was felt that huge libraries (such as POSIX) or functionality that you need only in exception handling (e.g. Carp), would not need to be loaded in their entirety, but only when they're reallly needed. This is all fine for "run x 1" environments. But it is counterproductive for "run x N" environments, as it introduces memory bloat in those environments (because of shared memory between child processes becoming unshared).

I think Perl needs a way to optimize for the different environments in which it is being used. That is way more important than a discussion about what the right amount of modules is.

Liz


In reply to Re: How Many Modules Is Too Many? by liz
in thread How Many Modules Is Too Many? by Belgarion

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.