http://www.perlmonks.org?node_id=60946


in reply to Re: rBuild hack
in thread rBuild hack

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
(tye)Re: rBuild hack
by tye (Sage) on Feb 27, 2001 at 01:46 UTC

    Using CGI.pm to generate HTML has little benefit. Using CGI.pm to process CGI parameters, especially forms, is nearly a must if you want good portability and security.

            - tye (but my friends call me "Tye")
      Using CGI to generate HTML has little benefit? You are never missing an end tag or improperly nesting. Your Perl code is exceptionally clean and easy to follow. Oh, and it's quicker to type up and less likely to have typo interference. Feel free to do things the hard way, but I count these as benefits. :)

        It has advantages and disadvantages. It catches some typos and forces closing of tags. It makes some things easier w/ less typing. It can also make things harder w/ more typing.

        But for most people, most HTML is not CGI-generated so learning a separate way to write HTML could easily not be worth it.

        My point was to distinguish using CGI.pm to generate HTML from using CGI.pm to process CGI parameters. The former is, to a great extent, a matter of personal taste or how your project fits in elsewhere, etc. Processing CGI parameters without using CGI.pm is almost always a mistake, and is usually a pretty big mistake.

        I say feel free to generate your HTML with CGI.pm, a templating system, or by hand. But you won't get any sympathy from me if you parse CGI parameters with anything other than CGI.pm (until a worthy replacement comes along).

        In the node I was responding to, the author was justifying not using CGI.pm by talking about generating HTML. To me that means he missed the point.

                - tye (but my friends call me "Tye")