http://qs321.pair.com?node_id=415811


in reply to Tao Perl Ching - The Scripture of the Way of Perl

Refusal to use CGI.pm leads to bad code.

Thanks.

I think CGI.pm is a big, ugly monster that should only be used when needed, and even then only for what this module does more than others. There's a lot in its source that makes me think Mr Stein never really bothered to learn (modern) Perl, but the easiest to find and refer to weirdness is "/gso". Apart from the somewhat weird code, CGI.pm is huge, inefficient and does things that shouldn't be in a CGI module, like generate HTML (HTML exists outside CGI, CGI can be useful without HTML. They have no close relationship).

Fortunately, there are CGI::Lite, CGI::Simple, and others. The latter unfortunately is interface-wise compatible with CGI; and I don't like that interface much.

I refuse to use CGI.pm in almost every situation. Does that make my code bad?

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }