perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clayton Cottingham <drf...@telus.net>
Subject Apache::Request vs Apache->request
Date Wed, 21 Jan 2004 21:57:58 GMT
while i understand the difference between these two i am unsure how to
handle these back and forth. let me explain:

I have an upload module with the handler using an Apache::Request
   my $r = Apache::Request->new(
        shift,
        POST_MAX        => 10 * 1024 * 1024,    # in bytes, so 10M
        DISABLE_UPLOADS => 0
    );


later on i want to send all the info recieved from a file to another
module that inserts this information into a database table

rather than pass through a  LWP::Simple::get call i would like to call
the  subroutine that handles the logic directly like so:

&MYMod::Add::Add($r);

BUT i have the above subroutine pulling in the Apache->request object if
through MYMod::Add::handler


so i tried something like this in my upload module


 my $r = Apache->request;

    # Standard stuff, with added options...
    my $apr = Apache::Request->new(
        $r,
        POST_MAX        => 10 * 1024 * 1024,    # in bytes, so 10M
        DISABLE_UPLOADS => 0
    );

and then 
&MYMod::Add::Add($r);

but this just borks out the uplaod procedure

and nothing get processed, whereas if i just pass in the Apache::Request
it doesnt process the parameters correctly

can anyone explain the finesse i am messing up?

-- 
Clayton Cottingham - WinterMarket Networks
Virtual Reality Programming, Design & Evangelist
Phone:(604) 875-1213
Cell: (604) 506-7230
Vancouver, B.C. Canada
wintermarket@wintermarket.net
http://www.wintermarket.net
IM's icq:154964789 hotmail:drfrog666@hotmail.com
yahoo:drfrog666@yahoo.com


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message