I've been migrating some code off of the ENV-dependent methods in 
CGI.pm, so I can turn of PerlSetupEnv. Anyway, I couldn't find an 
Apache::Request method that had the functionality of CGI::Delete. 
Since I use Delete extensively, I coded a replacement based on the 
param() prototype in Apache::Request. This may be useful to other 
programmer porting CGI.pm code.

# for compatibility with CGI::Delete - call with $apr->Delete("foo")
sub Delete {
     my $self = shift;
     my $tab = $self->parms;
     for (@_) {
         $tab->unset($_);
     }
} # end sub Delete

Trivial, once you know how. But maybe worth including in a future rev 
of Apache::Request? Or at least documenting? I spent some time just 
finding "unset".

It'd be even better if unset() would take a list argument, of course....

-- Mike

Reply via email to