I agree with chromatic++ on this one. Avoiding modules in order to "learn" something is an idea that took me a long time to overcome, and I still wrestle with it quite frequently. Many problems seem deceptively simple, but you are likely to reinvent nothing other than the same mediocre (to avoid a worse term) solution with the same inherent problems that many other novices before you came up with. (Manually parsing CGI parameters or recursing through directories f.ex are commonly undertaken problems that you actually need a very solid understanding of the subject at hand for before you can take a stab at them yourself.)

I don't mean to sound berating. I started out as a total newbie myself, as has everyone else. I've written bad code in the past that I now sneer at, and I still continue to learn how to write things in better ways every day. By all means do play around; I don't wish to discourage you from experimenting, and learning is best done by making your own mistakes and taking lessons home from them. Growth comes through error. You are definitely encouraged, as chromatic noted, to study the modules' source code and learn from it.

However, when writing production code, please stick to modules. It means you will have less code to write yourself and consequently to maintain. And when you look back at the source in 2 years, or your successor does then, there will be less things to figure out. Also, the modules will correctly handle a lot of details that you likely didn't even know about at the time. It is no shame or stigma that your experience is as of yet limited but please acknowledge and remember it when writing code that others need to rely upon. Priorities differ then. It was a hard lesson that took me a lot of time to learn.

Makeshifts last the longest.


In reply to Modules vs DIY by Aristotle
in thread Caching data with mod_perl by caedes

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.