Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I really really suggest you not use a name like Misc or Utility. It is most likely mis-named.
I have a module that is nothing but a miscellaneous collection of little subroutines that have nothing in common other that I find them handy. (E.g. my collection includes a sub for stripping leading and trailing whitespace from a string, one for producing a standard timestamp string, a wrapper for CORE::open that returns the open handle and takes care of the error checking, a function that removes duplicates from a list, preserving order, etc., etc.)
Why not put them in libraries called String, Time and List respectively?

(rant to the general populous) The word utility, helper and misc denote very broad or unsually specific. The following is an absurd example to prove the point.

One wouldn't create a package called AllMethods that contains everything under the sun in CPAN. It's unweildy and undirected. What if your Utility package has 100 little utility functions. Then you need to refactor, which can be a huge pain depending on the number of developers and the tools available. Moving concepts around will also be hell. There would be too much shared data.

Neither would one create a package for each method. Requiring a user to use all appropriate packages would be a bear to manipulate data. Dependencies could be quite the nightmare. Removing an entire concept would be hell.

The resolution: do not try to avoid classifying a method into the appropriate package. A package w/ one method is not neccessarily evil as one w/ 100 methods as long as they show relation. Yes, a 1 method package may seem silly, but what happens with your time method when you decide to add another? You have an appropriate place for it now.

But what of misclassifications? One misnamed or misplaced funciton is not too hard to move around as long as due dilligence on not waiting until the works becomes too much.

Please. Don't make a Helper/Utility/Misc package. It leads to messy code or less convenient code. (/rant)


In reply to Re: Miscellaneous.pm? by exussum0
in thread Miscellaneous.pm? by tlm

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (5)
    As of 2014-12-25 16:57 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (160 votes), past polls