Hello fellow monks,

months ago I did a toy project to explore one automation consept for our work environment. The idea is that we had an archaic tool that took a "batch" file and executed it. Problem was that no two jobs required the same batch files and manually editing those files was error prone. So, I created a Tk GUI to automate this process. In a zealous swing, I extended this tool to also execute that batch file on the hardware and parse the resulting output. As of right now, the program is over 2000 lines of code.

It didn't take management long to see the usefulness of this tool and the advantages it had over the original way. This of course, is great! However, as I stated earlier, this was just an exercise, and as such, new functionalities were added piece by piece to the already long program. I know that soon it will be decided to "productize" my tool for our customers, yet the program is just a fix-on-top-of-a-hack style. So I am asking for your guidance on how to better organize it.

I found one reference on PerlMonks to this question 62740, but it doesn't actually answer any questions. I think what I would like to do is break my program up into modules, but I can't seem to figure out how to do it cleanly. It is a GUI tool with added threads, socketted communication, and intra-tool communication links (bound tags) dynamically activated based on results, using plenty of global variables. Given this mess, can you recommend some reading to help me better transform the tool from its current version to a maintainable version. Thanks in advance.


In reply to reworking a large program by gri6507

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.