I was curious about different people's approach to this. I write fairly simple scripts (I am a simple sysadmin).
My longest script is about 300 lines, 100 of which is perldoc. That one, was a <qoute>generic</quote> FTP script that I had hoped would
do all of the sorts of ftp things we do (get, put, mget, mput, rename, etc), in one script driven by a control file.
Of course every time we came up with a new ftp batch job, it brought along slightly new requirements, so this script grew
and grew to its present size. I have been chided by one of our architects for not breaking it up into smaller pieces and using
them in concert.
What are the feelings here? Theses pieces are not large enough or general enough to be thought of as OO,
so that's not what I'm asking. More like, if you could write one 200 line script that worked for 12 different batch jobs,
or 6 smaller scripts (say 30 lines) to do the same, which approach would you take?
Thanks,
Rich
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.