First off, I'm a grump. I'll admit it, so don't take it personally.

Let's start with the name. I see no point in renaming it unnecessarily. I see no point in lengthening the name, either. Then again, I've seen a lot of people abbreviate the oh-so-difficult to type 'you' to 'u', saving a whopping TWO characters per time! (Moral of the story, keep frequently used names short.)

I'm not sure what LWP has to do with *server-side* CGI programming, so I'll leave that alone. You lost me.

Now for the bloat. Let's have some figures. How much space are the unused functions taking up? Do you realize that they're autoloaded when necessary, by default? How about the savings the OO interface provides by not importing symbols?

There are legitimate gripes -- Lincoln does say it does too much in the documentation. He wrote his own autoload scheme. The HTML functions should be split into another module, loaded only when necessary. The dual OO-procedural interface sucks. From personal experience, though, he accepts patches. Start with perldoc -m CGI.

It's not like you don't have other good choices, too. There's CGI3 (yes, the successor to CGI.pm, though not quite ready yet.) There's CGI::Lite. You're even welcome to write your own.

To answer your last question, though, it'll be time to stop using CGI.pm when there's a good, well-tested, and robust alternative. Maybe you're the one to write it.

Update: "Bloat" is such an ugly word. I'd like to see someone actually measure it sometime. There are good reasons to be concerned about CGI.pm, and, in my opinion, you haven't hit many specifics. "I think it's bloated, and it's possible to have namespace collisions with the procedural interface."

You're welcome to think that way (and the collision part is right, but it's possible with lots of modules, if you're not careful), but I'd like some facts. If its perceived bloat is such a problem, surely that would be worth measuring. Otherwise, how can anyone write a replacement and prove it's any better?


In reply to Re: CGI made me bloated by chromatic
in thread CGI made me bloated by mattg

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.