Hello there, God bless you.

I am sorry if this has been asked many times before, but the most recent reference I could find in this site is the node Has there been a new CGI..., which is dated Feb, 21 2001. Althrought, it is not the closets related to what I am talking about here, it is close enought (I think... mmm...)

What I want to know/ask is: What is the best way to go about CGI programming: using CGI.pm or the CGI modules to program a CGI's in Perl? What do you think is going to last the most?

Before researching into this matter, I thought that CGI modules was faster than CGI.pm programming (CGI:Base and related vs CGI), but reading the documentation on CGI::Form, it says it is slower to boot than CGI.pm related stuff because of the flexibility innherent to it.

So, the question is: Should I stay with CGI.pm or should I go for CGI::Base and related modules?

I have seen that almost everyone here is using CGI.pm, but reading the documentation for CGI::Base and related modules, I can read that using CGI::Base + HTML.pm + URI::Escape.pm is equivalent to using CGI.pm. And taken into account that, as far as I can tell, it is best for a piece of software to do the least amount of work, and cooperate with other pieces of software to do the work... I want to know/ask here: What do you think is the best way to do CGI development in Perl: Using the CGI.pm module or using the CGI::Base (and HTML, and HTTP and URI, and etc.) related modules?

As far as I can see, there have been quite a few questions about separating HTML generation from CGI processing lately, that's why I think this is a good question to ask for.

Hope this make some sense to you and you can help me decide what is the best way to go about developing CGI's in Perl. Thanks in advance for the thoughts you can bring into this matter for me.

Roberto Ruiz.

ps. Sorry for my English if it is not good enought. :)


In reply to CGI.pm vs. CGI modules by rruiz

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.