well i'm working on a cgi programm, and i've noticed it's starting to be pretty long (250)...

250 lines...long...? Wow. :) I yearn for the project I get to maintain that is any LESS than 10,000 - 15,000 lines (which I would still call a fairly small program, certainly not a "large" one :).

But anyways, for me, I find that the OO paradigm is a nice way to manage complexity. Taking the time to think about pieces of functionality as "objects" within a "system" (notice the Dr. Evilish quotations there) is the most natural way for me to manage complexity, and can lead to some very elegant solutions (not that functional programming can't, of course). There's no magic answer though, because everyone does things in their own way, and programming is hard. Think about what you're doing, seeing how you can break up your source files into logical units (aka, modules).

Needless to say, this is a question that is hard to answer, because again, everybody does things in their own way. The more code you write, and the more time you spend thinking about the way the pieces of your system are working together (or aren't), the sooner you'll figure out what works for you.

In reply to Re: How to write long programms? by mothra
in thread How to write long programms? by pokemonk

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, 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, 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.