Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
ok i have more time now to show more code!

first listing is the Add which should be able to be accessed by either the second listing or the location handler like in the third listing
**-- listing 1----** package MyMod::Add; use strict; use warnings; sub handler { my $r = Apache->request; my %args = $r->args; &Add($r); } sub Add { my $r = shift; my %args = $r->args; ..... } **---listing 2----** package MyMod::Uploads; use strict; use warnings; use MyMod::Add; use LWP::Simple; use URI::Escape; sub handler { # Standard stuff, with added options... my $r = Apache::Request->new( shift, POST_MAX => 10 * 1024 * 1024, # in bytes, + so 10M DISABLE_UPLOADS => 0 ); if ($r->upload){ upload($r); } } sub upload { foreach my $upload ( $r->upload ) { ##parse upload &MyMod::Add::Add($r); } } **---listing 3---** in httpd.conf: <Location /add> SetHandler perl-script PerlHandler MyMod::Add </Location>
how can i do both? i know its possible without the upload scenario

In reply to Re: Re: mod_perl Apache::Request vs Apache->request by drfrog
in thread mod_perl Apache::Request vs Apache->request by drfrog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-19 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found