I agree with the first part of your argument, you can learn some excellent stuff by looking at what has already been done in other modules.

However for anything other than learning, and your own pet projects, I would certainly recommend using non-standard modules (non-standard meaning modules not distributed with perl). I am not saying this because you might reinvent the wheel, but there is a huge part of good programming that people here seem to never think about: maintenance! If you copy and paste code from a module into your own code then you are stuck maintaining that code forever. So not only do you have to maintain the code specific to your project, but also the code that is general in purpose. Say there were actual bugs in the code you copied over, then instead of fixing the bug your self, you just use the CPAN module and grab the latest release (letting someone else fix the bugs for you).

But of course there are some problems using the module approach, if the author decides to change the API from one version to the next then you have to modify your code to use the new version. But that is why I would not recommend for production code using modules with lower version numbers or ones that in the documentation say they are 'alpha' or 'beta' modules. Other than that, include what ever you think might be handy.

Of course I recognize there are exceptions to every rule, like critical speed performance. But for most large applications, I just wanted to mention that I think maintenance should be a significant consideration. We may leave a project, but our code lives on forever!
Something to think about anyway.

Update: Anyone what to bother telling me why this node is a negative reputation? If you have a counter argument let me hear it, otherwise I still think the advise is pretty sound.

In reply to RE: RE: Modules by perlmonkey
in thread Stock Quotes by scribe

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.