I would prefer it if the first answer was not "look on CPAN, and don't attempt to try yourself."

As others have pointed out, that's not always the first answer. The "look on CPAN" answer does tend to get used when people start asking: "How do I handle this corner case? What about this special situation?" It is exactly this sort of "institutional knowledge" that a repository such as CPAN is perfect for accumulating.

The other reason that long-time users often resort to telling novices to "use CPAN" is because they want to provide a working solution, but they don't have the time or energy to teach the novice all the way up through the ranks.

Finally, I find that there are many modules on CPAN that are right at the boundary where "work required to understand the interface" is just about equal to "work required to replicate their functionality 'by hand'".

What tends to happen is that it is easier to open-code a solution that handles 90-95% of the cases; it's those last few percentages that require ugly special code, pleas to Seekers of Perl Wisdom, and responses to "use CPAN" and/or "let's make that a module".

The latter, however, eventually grows enough hair that when the next novice comes along, looking to solve the first 90% of their problem, says "wow, that module's too complex, I can just solve it with my own code like so..."


In reply to Re: Death and Return of TIMTOWTDI by tkil
in thread Death and Return of TIMTOWTDI by dakedesu

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.