package CGI::Apache2::Wrapper::Upload; use Apache2::Request; push our @ISA, qw/APR::Request::Param/; our $VERSION = '0.21'; { 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__ =head1 NAME CGI::Apache2::Wrapper::Upload - uploads via libapreq2 =head1 SYNOPSIS use CGI::Apache2::Wrapper::Upload; my $cgi = CGI::Apache2::Wrapper->new($r); my $upload = $cgi->req->upload("foo"); =head1 DESCRIPTION This module is a mod_perl wrapper around the upload functionality of L, for use by L. It is very similar to L, but only provides the I method for accessing the contents of an uploaded file. It is not intended to be used directly; rather, the I method of L should be used. =head1 SEE ALSO L, L, and L. Development of this package takes place at L. =head1 SUPPORT You can find documentation for this module with the perldoc command: perldoc CGI::Apache2::Wrapper::Upload You can also look for information at: =over 4 =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN::Forum: Discussion forum L =item * CPAN Ratings L =item * RT: CPAN's request tracker L =item * Search CPAN L =item * UWinnipeg CPAN Search L =back =head1 COPYRIGHT This software is copyright 2007 by Randy Kobes Er.kobes@uwinnipeg.caE. Use and redistribution are under the same terms as Perl itself; see L. =cut