My job consists of a mixture of both methods of writing perl. I write scripts that edit ada code, generate reports from information within the ada code, and generate reports from output of other programs. The normal development phase of perl scripts here is that the software leads realize they need something, ask for a script that generates the information that they need, and then expect the reports(or edits) done as quickly as possible.

What I try to do is write a one-shot that does what they want, but is open enough so that I can then use it as a base for a complete program that will be ready when they realize that they needed it more then once.

I find that this approach works well because it keeps the requesting lead happy, helps make maintaining the code easier, and it allows each lead to use it.

The only time that I don't write code that I can easly translate into a full program is when it will only be used as a one-liner called from a shell script with perl -e.

-xPhase


In reply to Re: Reactionary Coding-One-Shot Programs by xphase_work
in thread Reactionary Coding—One-Shot Programs by John M. Dlugosz

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.