As with any situation where you're including external code in your production code base you have to evaluate what it contributes and what the pros and cons are of including said code. But from the perspective you're speaking (external code will slow down my code, no?) I personally don't think this is an issue. Most code from the likes of CPAN is heavily tested and will hopefully have thought of most of the things that you won't have if you were to have re-written the necessary code yourself. To re-write what you need will probably take far longer as a lot of the code on CPAN has had quite a few man hours behind them and are quite often written for a specific purpose by people who know the ins and outs of the problem space. The issue of speed is really a bit of a premature optimisation as generally the bloat of a module is the amount of code, which if you're only using a small amount is a non-issue as the only penalty you'll incur is the compile-time parsing. Of course this is not to say include every module, all and sundry, for every piece of code that could use a module, just to say that far more often than not the excuse of speed when including CPAN type code isn't an issue.
HTH

_________
broquaint


In reply to Re: To USE or not to USE by broquaint
in thread To USE or not to USE by draconis

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.