CGI.pm is very good module. But - TIMTOWTDI. Before you start to use it I want to say some words pro et contra. Order of my notes is irrelevant and does not correspond to importance.

This module is large. And, therefore, slow. Especially in pure cgi envirionment (mod_perl enables to preload modules). CGI3 is managed to solve this problem - it is split in several parts and you can load only what you need.

Where are you going to use it? In apache+mod_perl environment you could try other modules - Apache::Request (or Apache::RequestNotes) and Apache::Cookie for request params and cookie parsing. They use apache API to make work and hence notable faster.

What is scale of your project? Several dynamic pages or many-many pages with similar structure and/or reusable parts? In last case you could consider one of special kits (i prefer two - HTML::Mason and AxKit but it is to your taste). All (or almost all) these kits provides even more comfortable access to request parameters and different wonderfull means to produce HTML. Many of them work in pure cgi environment.

Hope my thinks are helpfull and not very intricated :)

-- brother ab

In reply to Re: Should One Use CGI.pm to Generate HTML? by brother ab
in thread Should One Use CGI.pm to Generate HTML? by sierrathedog04

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.