Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2022-05-25 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?