Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 2604
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: jdaniel [...] mit.edu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: $q->delete_all only deletes one param
Test script showing bug: #!/usr/bin/perl use CGI; $q = new CGI; $q->param('foo', 1); $q->param('bar', 1); warn "Before delete_all: ". join ' ', $q->param; $q->delete_all(); warn "After delete_all: ". join ' ', $q->param; ------------- Script output: Show quoted text
> ./test.pl
Before delete_all: foo bar at ./test.pl line 8. After delete_all: bar at ./test.pl line 10. -------------- Suggested fix: delete_all should pass a pointer to the array of parameters instead of the array itself since that's how delete seems to be expecting it. Show quoted text
> diff -u /usr/lib/perl5/5.8.0/CGI-2.93.pm /usr/lib/perl5/5.8.0/CGI.pm
--- /usr/lib/perl5/5.8.0/CGI-2.93.pm Mon May 19 19:03:31 2003 +++ /usr/lib/perl5/5.8.0/CGI.pm Mon May 19 19:02:18 2003 @@ -1052,7 +1052,7 @@ sub delete_all { my($self) = self_or_default(@_); my @param = $self->param; - $self->delete(@param); + $self->delete( [ @param ] ); } EOF
From: jdaniel [...] mit.edu
It looks like the bug was fixed in 2.94 but the ticket was never closed. I don't seem to have the bits to close it as guest.