On 10/14/05, Brett Sanger <[EMAIL PROTECTED]> wrote:
>
> > my $fh = $query->upload('filename');
> > my $real_fh = \*$fh;o
>
> That doesn't seem to work for me:

That is unfortunate.  I don't have time right now to dig into it
further, but will try later on.

> Also, I don't seem to find $filename used anywhere...did I miss it?

It is buried in this beautiful mess:

    #########################
    # Create a file handle object to simulate a CGI.pm upload
    #  Pulled directly from CGI.pm by Lincoln Stein
    my $tmp_filename;
    my $seqno = unpack( "%16C*", join( '', localtime, values %ENV ) );
    $seqno += int rand(100);
    my $newfh;
    for ( my $cnt = 10 ; $cnt > 0 ; $cnt-- ) {
        next unless my $tmpfile = new CGITempFile($seqno);
        $tmp_filename = $tmpfile->as_string;
        last
          if defined( $newfh = Fh->new( $filename, $tmp_filename, 0 ) );
        $seqno += int rand(100);
    }
    die "CGI open of tmpfile: $!\n" unless defined $newfh;
    $CGI::DefaultClass->binmode($newfh)
      if $CGI::needs_binmode
      && defined fileno($newfh);
    #########################


> I'm actually entertaining the idea of using an Acme module, but Acme::Damn
> doesn't pass it's tests on my dev box. :(

Perhaps you are using an older version of perl (or a bleading edge
newer version)?  That might explain why the above trick doesn't work
for you either!  If that is it, I guess I need to add some version
restrictions to my module!

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to