in reply to to use or not to use CGI.pm
It's important to note that CGI.pm implements a good autoloading mechanism. This means that subroutines are only ever loaded when you use them and that therefore there is very little "dead weight".
Having said that, it's a good idea to take a look at the export sets that CGI.pm provides and start using one that better models the set of subroutine that you use. Personally I always use TT to generate any HTML, so I only every use the CGI.pm subroutines that give access to CGI protocol functionality. For that reason, most of my CGI programs start with:
use CGI ':cgi';
This means that I can't accidently start using any of the HTML generation functions, thereby breaking the separation of processing and display logic in my program.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|