Hi monks.... I hope this is not too off-topic, but it does relate to Perl applications.

I've just joined a company that has an application that generates a bunch of CGI scripts based on certain values. These form the 'backend' of a project, and this has become quite critical for the company. I've managed to convince them that the existing code is unmaintainable, and am in the process of doing a complete re-write.

My problem is, I'm having difficulty deciding whether I should stick to the CGI Generation method, or to make it all run out of one CGI (or mod_perl handler) with a config read for each individual project. I guess the pros and cons of each are fairly self explanatory, but to state the obvious, code-generation makes it much more difficult to fix bugs in previously created projects, while pushing everything into a common library runs the risk of everything breaking when a bug is fixed (and we're talking hundreds of projects, the continued up time of all of which is critical to the company).

Although I probably naturally lean towards running it all from a library (and putting a sound release procedure in place), there will almost definitely have to be an option to generate the CGI, since a few projects need customisation which will likely be beyond the scope of my generator. Besides that, the fact that the existing system (which sort of works) does things this way, means that it's a greater risk for me personally (ie. it could be seen of a case of fixing something that wasn't broken if it all goes wrong).

Anyway, any wisdom you can share on this problem will be greatly appreciated :)


In reply to (OT) Generated Code vs. Libraries by Mutant

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.