in reply to Should One Use CGI.pm to Generate HTML?

CGI.pm is very good module. But - TIMTOWTDI. Before you start to use it I want to say some words pro et contra. Order of my notes is irrelevant and does not correspond to importance.

This module is large. And, therefore, slow. Especially in pure cgi envirionment (mod_perl enables to preload modules). CGI3 is managed to solve this problem - it is split in several parts and you can load only what you need.

Where are you going to use it? In apache+mod_perl environment you could try other modules - Apache::Request (or Apache::RequestNotes) and Apache::Cookie for request params and cookie parsing. They use apache API to make work and hence notable faster.

What is scale of your project? Several dynamic pages or many-many pages with similar structure and/or reusable parts? In last case you could consider one of special kits (i prefer two - HTML::Mason and AxKit but it is to your taste). All (or almost all) these kits provides even more comfortable access to request parameters and different wonderfull means to produce HTML. Many of them work in pure cgi environment.

Hope my thinks are helpfull and not very intricated :)

-- brother ab
  • Comment on Re: Should One Use CGI.pm to Generate HTML?