Looks like nobody wants to touch this one, so here are my
random thoughts. I could probably say something about the
importance of the virtues of Laziness and Hubris, but a lot
of perl people have probably heard that before. Instead,
I'm going to mention the idea of
Extreme
Programming, especially the principle that
simplicity is key. Don't try to build the perfect
be-all, end-all program. Just makes something that does
what you need, right now, and don't worry about anticipating
every possible future need. (Of course, you don't want to
hardcode your script to rename "foo" to "bar", but make
things like that parameters so that you could concievably
use the thing again.) In the back of your mind, remember
that you might have to change your code around later.
Keeping it simple will make it easier to change when the
time comes, and make you less reluctant to do it.
Without knowing very much about your script, it's hard to
make specific recommendations. Usually, people try to
offload as much work to subroutines as possible, keeping
the main routine as simple as possible. OTOH, you want to
remove as many assumptions as possible from the subroutines
so that they'll be useful later. Don't spend all your time
twiddling, though. Wait and see where you can improve your
program when time tells you what its limitations are.
Renaming a directory is easy. Just rename it. That even
works in Windows now.
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.