I apologize if this meditation is somewhat rambling, but free association is a valid meditation technique, right? ;^)

Nearly a year ago, when the feature was first discussed, I posted Perl 6's part(). For those who aren't aware, part() is a new built-in that will come with Perl 6; it's essentially used to categorize ("partition") a list, dividing it into several lists based on an index returned by a coderef.

Since then, I've drifted away somewhat from the Perl community, mostly into message-board RPGs. It's not that I haven't been hacking Perl in the last year, merely that my "community time" has been spent elsewhere. Well, this weekend the board I've been spending most of my time on went down for upgrades. With winter break and nothing to read either online or off, I revisited the Monastery and looked over some of my old nodes.

The node above came to my attention; I realized that, although I had perfected the essentially-four-line function eleven months ago, I'd never done anything with it. So I spent today packaging it up into List::Part.

The most important thing for getting this finished was one that I did at the very start: I used h2xs immediately to create the directory I would build the module in. Why is this so important? Because it builds all the little auxilary files for you. If I had just sat down and hacked, like I often do when I feel like making a module, I would have stopped when it was time to build all those little files, simply because I wasn't sure where to begin.

I don't know about other people, but this is a chronic problem for me: I stop working on a module when I'm finished and have to build all the other files around it. The same is true of the related case, where I make a module for one program and then realize it's generally applicable. I'm not quite sure what would fix this; perhaps a new h2xs mode that worked with an existing .pm, or a different tool. Maybe it's something I haven't thought of. Maybe it's even just that I need to discipline myself more. Thoughts on this?

=cut
--Brent Dax
There is no sig.


In reply to Thoughts on making modules by BrentDax

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.