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: 38034
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: LDS [...] cpan.org
Requestors: mmaslano [...] redhat.com
Cc:
AdminCc:

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



Subject: CGI.pm bug in exists() on tied param hash
Description of problem: The CGI.pm package's exist() function override for tied hashes fails. It always reports any given param does not exist. This can potentially break a _lot_ of CGI scripts. Version-Release number of selected component (if applicable): CGI.pm 3.38 (works in 3.37), which was included in perl-5.10.0-31.fc9.i386 built July 24. How reproducible: Very; every time. Steps to Reproduce: 1. Run the attached program like so: exists_test.pl a=1 b=2 c=3 2. 3. Actual results: Key: 'a', does not exist (yet it has value '1'). Deleting $input{a}. Key: 'a', does not exist. Key: 'b', does not exist (yet it has value '2'). Deleting $input{b}. Key: 'b', does not exist. Key: 'c', does not exist (yet it has value '3'). Deleting $input{c}. Key: 'c', does not exist. Expected results: Key: 'a', does exist (yet it has value '1'). Deleting $input{a}. Key: 'a', does not exist. Key: 'b', does exist (yet it has value '2'). Deleting $input{b}. Key: 'b', does not exist. Key: 'c', does exist (yet it has value '3'). Deleting $input{c}. Key: 'c', does not exist. Additional info: The problem is line 1179 of CGI.pm, which currently reads: exists $_[0]->{$_[1]}; but should be: exists $_[0]->{param}{$_[1]}; (this bug was fixed by todd_lewis)
Already fixed in version 3.39. This is a duplicate of a previous bug report.