Here's a little scratch tool I whipped up a few weeks ago. It's nothing esoteric, but it's saved me a bit of time both at work and at home, when considering how I want to arrange a new module, or more importantly, a set of interrelated modules.

As the name implies, this script accepts a simple text input that describes one or more modules, modeled in a very abbreviated Perl-like syntax. The input is line-oriented, but is somewhat forgiving of minor variations.

# input is line-oriented, similar to the following example: package Foo::Bar - the package and summary to be created isa Foo; no This; use That qw(that); require The::Other; require "Yet/"; ->new($arg); # returns a blessed hashref ->method($arg); # a normal object method ->property = $value; # a published property with accessor routine ->{property} = $value; # a private property without accessor
All it does is create the correct directories and makes stumps-- stubby implementations of the aforementioned module or modules. The template is very crude, but saves the labor of writing all the cursory comments, POD, and subs from scratch.

There's plenty of room for improvement and extension. One feature I didn't finish was to name various proposed tests, and have the stump script write the appropriate Test::* scripts alongside each boilerplate module.

For brevity and experimentation, I just published the script at - play with it or offer ideas.

[ e d @ h a l l e y . c c ]

In reply to STUMP - Simple Textual Unified Modeling in Perl by halley

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, 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
  • 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.