perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Schindl <>
Subject Re: [mp2] can't locate object method "upload" via package "Apache::RequestRec"
Date Sun, 07 Nov 2004 12:51:06 GMT

Carl Brewer wrote:
> Tom Schindl wrote:
>> Carl Brewer wrote:
>>> sub get_uploaded_image {
>>>     my ($name, $max_size, $r) = @_;
>>>     use Apache::Upload;
>> my $req = Apache::Request->new($r);


just use Apache::Request->instance($r) and you're save but you 
definately need to do that or simply pass on the created 
Apache::Request-Object to you subroutine.


I think that you and not a small number of other people have a problem 
to see the difference between Apache::Request and Apache::RequestRec 
they're both not the same.

"simply" wrapps the inter apache request-record to  be accessible by 
perl-modules. Docs at

is at it's heart a C library to deal easily with HTTP-Requests e.g. read 
out form-data, ... . It has a mod_perl-binding named Apache::Request but 
the whole lib can also be used by any other C-Module.

The already mentionned perl-Binding Apache::Request of libapreq is also 
a derived from Apache::RequestRec and that's why it also has all methods.


>> my $upload = $req->upload($name);
> I've got that in my subroutine and it works, but I'm concerned
> that I'm dipping into the buckets too much?  Is it safe to
> call on $r more than once per form submission?  I'm
> already runnign the new request() in a subroutine I call
> before I call the Upload one.
> thanks again,
> Carl

Report problems:
Mail list info:
List etiquette:

View raw message