Skip Menu |

This queue is for tickets about the CGI-Uploader CPAN distribution.

Report information
The Basics
Id: 14007
Status: resolved
Priority: 0/
Queue: CGI-Uploader

People
Owner: MARKSTOS [...] cpan.org
Requestors: william [...] knowmad.com
Cc:
AdminCc:

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



Subject: Strange output from create_store_gen_files
Hi Mark, So that other problem I mentioned that I was working on turns out to be some kind of bizarre return value when handling hashes. Basically, the %out that is returned by the create_store_gen_files() method is returning a scalar value instead of a hash. I've played with dumping the values before returning to be sure it is a hash. All's fine. A simple test subroutine works as expected so I don't know why this behavior is occurring. As a workaround, I've changed the return to a hashref which, with proper changes to the calling code, works fine. I'll include this in the patch that I'll submit for v1.1_1 as I see no reason that a hashref could not be used. Have you ever seen a hash returned as a scalar? It returns what you'd get from doing 'scalar %hash' which is a fraction that has something to do with the hash buckets as I recall. I don't return hashes much but this is not the expected behavior. FWIW, I'm using Perl 5.8.7 on Debian Linux. Thanks, William
[guest - Thu Aug 4 01:08:46 2005]: Show quoted text
> Hi Mark, > > So that other problem I mentioned that I was working on turns out to > be some kind of bizarre return value when handling hashes. > Basically, the %out that is returned by the > create_store_gen_files() method is returning a scalar value
instead Show quoted text
> of a hash. I've played with dumping the values before returning to > be sure it is a hash. All's fine. A simple test subroutine works
as Show quoted text
> expected so I don't know why this behavior is occurring. > > As a workaround, I've changed the return to a hashref which, with > proper changes to the calling code, works fine. I'll include this > in the patch that I'll submit for v1.1_1 as I see no reason that a > hashref could not be used. > > Have you ever seen a hash returned as a scalar? It returns what you'd > get from doing 'scalar %hash' which is a fraction that has > something to do with the hash buckets as I recall. I don't return > hashes much but this is not the expected behavior. FWIW, I'm using > Perl 5.8.7 on Debian Linux. > > > Thanks, > William
William, Did you ever make progress with this? Since I'm not experiencing this myself, I'm stalling this ticket until I have a test case to reproduce it. Mark