|Just another Perl shrine|
RFC CGI.pm refactoringby tachyon (Chancellor)
|on Feb 14, 2002 at 12:31 UTC||Need Help??|
CGI.pm is the Perl standard for CGI parameter parsing. A number of criticisms are regularly aired about this module ranging from its large size, 'eclectic' internal structure and arbitrary inclusion of HTML generation which is not used or favoured by a significant percentage of users.
Its strengths include an excellent interface, extensive documentation and its extended real world testing.
Even the author suggests that this module has become monolithic and convoluted. So - time for a refactoring...
CGI::Simple provides a relatively lightweight drop in replacement for CGI.pm at about 1/3 the total size with less than half the default code load. It shares an identical OO interface to CGI.pm for parameter parsing, file upload, cookie handling and header generation. It does not provide any methods to generate HTML. The module is strict and warnings compliant, uses Selfloader to load rarely used methods on demand, and is entirely object oriented. A complete functional interface is available by using the CGI::Simple::Standard wrapper module. An extensive test suite is included. CGI.pm methods have changed somewhat across the versions. Concordance testing appears perfect against CGI.pm 2.78.