Others have commented on the Perl side of this, and the advantages to code maintenance of one approach or the other, but I'd like to add another consideration: the web side. It's the sort of theoretically minor thing that could easily be overlooked, but depending on your situation it could be significant.
If you do the whole thing as one big script, all the parts of it will have the same URI; if you split it up into multiple scripts, they won't. (Another poster spoke of splitting out various modules and having the main script load those it needs; that hybrid approach could be made to fall, from the web's perspective, into the one-big-script category. Conversely, if you use GET, one script may have different URIs.)
So you want to ask yourself, does it matter whether the various pieces have the same URI or not? If two pages have the same URI, it has a lot of effects. The browser will treat them the same for bookmarking purposes. Do you want to be able to bookmark the "add comment" page, for convenience, or do you want the user to have to go through the main page every time? Any forms they contain will probably get treated as the same page of forms by browsers that have autofill features. Is that good, or bad, in your circumstances? There may also be more subtle effects; a page that has the same URI as an earlier page may force the earlier page out of a browser's cache, for example. These sorts of things are IMO well worth considering when you decide whether to put various parts of your site in the same script or separate them.
--jonadab
In reply to Re: One Big Script v. Several Small Scripts
by jonadab
in thread One Big Script v. Several Small Scripts
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |