| CGI-Apache2-Wrapper documentation | Contained in the CGI-Apache2-Wrapper distribution. |
CGI::Apache2::Wrapper::Upload - uploads via libapreq2
use CGI::Apache2::Wrapper::Upload;
my $cgi = CGI::Apache2::Wrapper->new($r);
my $upload = $cgi->req->upload("foo");
This module is a mod_perl wrapper around the upload functionality of libapreq2, for use by CGI::Apache2::Wrapper. It is very similar to Apache2::Upload, but only provides the tempname method for accessing the contents of an uploaded file. It is not intended to be used directly; rather, the upload method of CGI::Apache2::Wrapper should be used.
CGI, Apache2::Upload, and CGI::Apache2::Wrapper.
Development of this package takes place at http://cpan-search.svn.sourceforge.net/viewvc/cpan-search/CGI-Apache2-Wrapper/.
You can find documentation for this module with the perldoc command:
perldoc CGI::Apache2::Wrapper::Upload
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CGI-Apache2-Wrapper
This software is copyright 2007 by Randy Kobes <r.kobes@uwinnipeg.ca>. Use and redistribution are under the same terms as Perl itself; see http://www.perl.com/pub/a/language/misc/Artistic.html.
| CGI-Apache2-Wrapper documentation | Contained in the CGI-Apache2-Wrapper distribution. |
package CGI::Apache2::Wrapper::Upload; use Apache2::Request; push our @ISA, qw/APR::Request::Param/; our $VERSION = '0.215'; { no strict 'refs'; for (qw/type size tempname filename/) { *{$_} = *{"APR::Request::Param::upload_$_"}{CODE}; } } sub Apache2::Request::upload { my $req = shift; return unless @_; my $body = $req->body or return; $body->param_class(__PACKAGE__); my @uploads = grep $_->upload, $body->get(@_); return wantarray ? @uploads : $uploads[0]; } *bb = *APR::Request::Param::upload; 1; __END__