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: 73378
Status: rejected
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
Cc:
AdminCc:

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



Subject: upload() does not return open handle (prematurely closed?)
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1008
Download (untitled) / with headers
text/plain 1008b
Hello, I've a script that has 2 upload functions: • one uploads from the file handle to disk. • The other attaches the tmp file to an email. The latter works fine. The former stopped working today (no code changes). Before and after the upload() call the object dump is the same (only the tmpfile path is different). Here is the original code: [code] my $cgi = CGI->new(); # no $CGI:: vars set so they are the defaults ... my $tmp_fh = $cgi->upload($param_name); if ( defined $tmp_fh ) { ... [/code] I had to add this after the call to upload() to get it to work: [code] # rt my $upload_hack = ''; if (!defined $tmp_fh) { my $filename = $$cgi->param($param_name); if ($filename) { $upload_hack = $cgi->tmpFileName($filename); open $tmp_fh, '<', $upload_hack; # unlink()d when we're done w/ it } } [/code] Any ideas why it'd be closed? Is there a better way to detect this and reopen? thanks! -- Dan
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6892-1324403376-1604.73378-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 312
Download (untitled) / with headers
text/plain 312b
I'm sorry, we don't have the bandwidth here to answer support requests in the bug tracker. If you aren't sure what's wrong, I recommend asking for support in a forum like perlmonks.org or StackExchange. If you have a Test::More-style test that illustrates a bug in CGI.pm, please follow-up again here.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6892-1324403376-1604.73378-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-6892-1324403376-1604.73378-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6892-1324404866-1519.73378-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 651
Download (untitled) / with headers
text/plain 651b
On Tue Dec 20 12:49:36 2011, MARKSTOS wrote: Show quoted text
> I'm sorry, we don't have the bandwidth here to answer support requests > in the bug tracker.
This was meant more to alert you to the problem not ask what to do about it (i.e. I already have a work around in the original post). Feel free to ignore those questions, I require no answers to them, they were mainly for discussion. Show quoted text
> If you have a Test::More-style test that illustrates a bug in CGI.pm, > please follow-up again here.
I'll see what I can do, it might be tricky since since I've no selinium on my laptop ;) I'll look over the test that CGI/pm has though and see what I can come up with.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.