in reply to Ok, what am I doing wrong with my use of CGI::Upload?

Where do you use $query (my $query = $self->query)? Is $self compatible with CGI::Upload which states it needs "any kind of CGI.pm like module. The requirements are that it has to support the ->param method and the ->upload method returning a file handle."?

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Replies are listed 'Best First'.
Re^2: Ok, what am I doing wrong with my use of CGI::Upload?
by northwind (Hermit) on Feb 06, 2006 at 18:05 UTC

    $query is a hold-over from the real code (I was trying to pare down the code into an example I could easily post).  $self is part of a CGI::Application framework.

      CGI::Upload needs the query object, not the CGI::App object. Try my $upload = CGI::Upload->new( { query => $query } );.

        Ok, trying that... nope, doesn't help.  CGI::Upload understands $upload = CGI::Upload->new({query => $query}) and gives the exact same Data::Dumper dump ( die Dumper(\%file, \@foo) ):

        Error executing run mode 'import_file': $VAR1 = { 'handle' => bless( \*IO::File::_GEN_0, 'IO::File' ), 'name' => 'user_editor_outline.txt', 'type' => 'txt', 'mime' => 'text/plain' }; $VAR2 = [];