> From: Shane McCarron [mailto:[EMAIL PROTECTED] 
> [Wh]y mess with the request object at all?  Here is a fragment 
> that works whether you are in CGI or mod_perl or mod_perl1.99 
> or mod_perl 2 modes - obviously you would want to put in some 
> error checking for your environment:
> 
> <%args>
> #name is the upload file name
> $name=>undef
> </%args>
> my $q = $m->cgi_object() ;
> 
> my $h = $q->uploadInfo($name);
> 
> my $realFile = "$basedir/$name";
> 
> open (OUTFILE, ">$realFile"); 
> binmode OUTFILE ;
> my $buffer ;
> while (my $bytesread=read($name,$buffer,1024)) {
>   print OUTFILE $buffer;
> }
> close OUTFILE;

http://search.cpan.org/~drolsky/HTML-Mason-1.35/lib/HTML/Mason/Request.pm

"cgi_object

    Returns the CGI object used to parse any CGI parameters submitted to the
component, assuming that you have not changed the default value of the
ApacheHandler args_method parameter. If you are using the 'mod_perl' args
method, then calling this method is a fatal error. See the ApacheHandler and
CGIHandler documentation for more details."

I haven't tried it, but I would imagine it either does what the manual says,
or will do at some point in the future.

G


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to