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


in reply to Re: Re: RFC CGI.pm refactoring
in thread RFC CGI.pm refactoring

Yes there are. The test suite contains just under 1000 unit tests. This includes the entire CGI.pm CGI related test suite plus just under 100 concordance tests that have the basic form:

use CGI; use CGI::Simple; use Test; # make a CGI environment; $ENV{'BLAH'} = .... [snip] my $qc = new CGI; my $qs = new CGI::Simple; my @params = qw(blah blah); my $qc_scalar = $qc->some_method(@params); my $qs_scalar = $qs->some_method(@params);; my @qc_array = $qc->some_method(@params);; my @qs_array = $qs->some_method(@params);; ok( $qs_scalar, $qc_scalar ); ok( join'',@qs_array, join'',@qc_array ) # continues for all common methods

Concordance with CGI.pm 2.78 is 100%. CGI::Simple loads under 300 lines by default and uses Selfloader. As it is inherently OO it does not use Exporter at all and is considerably faster than CGI.pm when called OO. The wrapper module that gives you a functional interface CGI::Standard uses a couple dozen lines of code to make the namspace exports either on demand (using an AUTOLOAD routine) or as single methods or method sets.

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print