Another way to do it, besides those offered, is if you are working on a CGI that is to run a whole site (as opposed to one specific function) which has many different functions is to break down the cgi into multiple scripts, and create a module that combines any common variables and functions into one place; this works much better when you have mod_perl running than without since there might be a lot of overhead calling in this CGI for one sub-script, but not when it's kept in memory. Generally the hardest part here is maintaining consistent HTML output in terms of everything outside of the specific CGI script for each sub-script, but the use of templating classes (HTML::Template, Template Toolkit 2) makes this part easy.
Dr. Michael K. Neylon - mneylon-pm@masemware.com
"You've left the lens cap of your mind on again, Pinky" - The Brain
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|