does it make that much difference or am i splitting hairs?

Well, in this particular case, you might be splitting hairs a bit, but behind the superficial face of your question lies a much bigger one. That is, should I use a module, or write my own equivalent code? I think the answer to that depends on the situation, but I'd bet more often or not the module is the way to go.

There are many reasons, and this has been discussed at great length in the past, but for me the biggest reason is bugginess. Code has bugs; this is a fact. Using a module often helps mitigate the effect of this problem. Perhaps you could argue that the extra complexity of a module adds the chance for even more bugs, but I would counter that the most egregious bugs are of the semantic variety. These are the kind that modules are great for. Once discovered, fixing the module fixes the bug everywhere. It's an instant win, and a compelling reason to stick with the module over the (possibly simpler) hard-coded solution.

As a final note, I should mention that arguing against modules, per se, in terms of efficiency is almost always a losing proposition. In this case, I would bet dollars to cents that the time it takes to send the cookie over the network is an order of magnitude higher than the time it takes to generate the cookie, module or not.


In reply to Re: When to use modules? by revdiablo
in thread When to use modules? by wolfi

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.