in reply to CGI.pm - put up or shut up

tachyon, love the idea, though there are a few minor nits I would pick.

sub new { my ( $class, $init ) = @_; $class = ref($class) || $class; my $self = {}; bless $self, $class; $self->init($init); return $self; }

Why is the ref( $class ) in there? new, to many OO programmers is a class method but the ref( $class ) is usually there to help create a clone of the object, thus making this an instance method. Which is this? It's confusing to many programmers. I'd take that out.

# uncomment this if you want to use query string and POST at the same +time (not recommended) # $data .= $ENV{'QUERY_STRING'};

That's good, but I don't see a url_param() method. Unfortunately, sometimes Web pages get coded POST data and URL parameters. Rather than forcing the programmer to a make a permanent hack to your code or reset the request method and create a new object, there should be a convenient method for getting those params.

As for not handling uploads, I would add that in. If you do that, you've provided, in one module, all of the functionality that 99% of Web programmers use. If you did that and threw in cookie support, this might be a module I could use here at work. Barring that, it's just a novelty for me in terms of serious work. I could use if for small projects, but I don't want to have more than one CGI module being used here.

On the off chance that you do add support for multipart/form-data, you'll need to take out this:

$data =~ s/%00//g; # prevent null byte hacks $data =~ tr/\000//d;

No sense in destroying most uploads :)

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.