Using CGI.pm and mod_perl version 2 modules Apache2::Response, Apache2::RequestRec, Apache2::RequestUtil, Apache2::RequestIO, APR::Pool are required in CGI.pm.

In fact, it was APR::Table that was the fat cat in the bunch, but point taken.

I would say CGI.pm is bloated because of the massive amount of redundant coding and the fact that the file size is about 262,144 bytes give or take a few bytes. Perl still has to open and read that file.

Okay, well I have now glanced at it. Looks to me like most of that is actually comments. Too many comments can be as irritating as too few, but in any case, they are irrelevant to the compiler/interpreter. Further:

  1. 260k is smaller than many or most image files, there is no significant overhead here.
  2. CGI.pm only needs to be loaded once if configured into apache, so the size of the source file is generally irrelevant. Also I'd repeat that "more code done well will be more efficient than less code done poorly" (which may or may not be true here). Just judging a program on the total mass of the source is not very useful.

Again, I think you need to present some concrete examples of what you mean by "redundant" and "bloated". Simply saying "Well I can tell you haven't read the source" is akin to saying "I can't give you any reason, just take my word for it" -- if you cannot demonstrate something in real terms (not vaguaries), how do you expect potential users to take you seriously?

Thanks for raising the issue tho, in the future I may make use of CGI::Minimal instead ;P


In reply to Re^3: Whats better then CGI.pm? by halfcountplus
in thread Whats better then CGI.pm? by $h4X4_|=73}{

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.