For instance, I was surprised to note that the startform method does not include a built-in parameter to give the form a name.

This works for me: start_form(-name=>"form_name")

A lot of things aren't documented in the CGI.pm docs because they're redundant. You can generally assume that any parameter like that can be passed just as I did it above and it will work. Generally, this is the way to pass any complex arguments to any CGI function. The "standard" arguments (that require no named parameters) tend to be very basic. Otherwise, you'd have functions that take a ton of standard arguments, which makes it difficult if the only one you care about is the 6th. The idea is to make your CGI.pm code more readable, not less. A million unnamed arguments for each function is impossible to maintain.

I think other posters have already neatly summed up the various reasons people use or don't use CGI.pm. In the end it's personal preference. I've heard people in the past say that using CGI.pm to build your HTML pages means you don't have to be an expert on HTML, but I've found that in practice, you have to really know HTML before these CGI.pm functions will make sense when building the pages themselves.


In reply to Re: Should One Use CGI.pm to Generate HTML? by Fastolfe
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.