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

STUMP - Simple Textual Unified Modeling in Perl

by halley (Prior)
on May 21, 2003 at 03:35 UTC ( #259633=CUFP: print w/replies, xml ) Need Help??

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 ]

Replies are listed 'Best First'.
Re: STUMP - Simple Textual Unified Modeling in Perl
by adrianh (Chancellor) on May 21, 2003 at 07:54 UTC

    You might want to take a look at the Simon Cozens article on POOL which is similar.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://259633]
Approved by mjeaton
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2017-05-26 07:59 GMT
Find Nodes?
    Voting Booth?