Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_perl and strategies

Status
Not open for further replies.

perler123

IS-IT--Management
Jun 8, 2006
2
0
0
CH
Hello
I'm a beginner in mod_perl and I have some strategical questions;

1) When it is use? In all case? for each file of a web aplication developped in CGI?

2) In what way? By using a directory interpreted by mod_perl? or by translating all my CGI scripts into mod_perl handler, add this modules to @inc and add the correspondant lines in httpd.conf?

thanks... I'm a litle bit lost even if I have read lots of tutorials...
 
mod_perl is only active for the respective scripts that you define in apaches configuration.

You can use Files or Location directives to specify groups of files as well.

I know you read some tutorials on the subject, but I don't know if you've seen these few:

This is Apache's eToys example site. Its very overcomplicated for a basic mod_perl site, but it gets the theory of everything across fairly well.

Also, the configuration guide is good too:

If you need any other help, just reply and I'll be happy to lend a hand.

Thanks
Derek

-------------
Derek F.
 
Hi,

1) Not all because you can easily mix the normal cgi scripts with your apache handlers. Simplistically speaking you would want the scripts that get hit on 10 times a second in mod_perl (like say a redirection URL on tinyurl.com) and you want your long tedious scripts (like one that sends mails and takes minutes to complete) on the normal cgi (or Apache::Registry). And if you're developing mod_perl handlers, make sure you're really taking advantage of it by reusing memory, dbi connections, etc too.

2) To run scripts inside a directory you have Apache::Registry (or Apache::perlrun) which personally I keep away from. If you want to add individual handlers then I guess you'd have to use LocationMatch tags in your httpd.conf.

HTH,
San

---
cheers!
san
smoking3vc.gif


print length "The answer to life, universe & everything!
 
okay thanks, but I don't understant the advantage of the locationMatch if I have for exemple :

PerlModule mod_perl::advanced_query::advanced_query
<Location /advanced_query>
SetHandler perl-script
PerlHandler mod_perl::advanced_query::advanced_query
PerlSendHeader On
</Location>

I can't load some perlModule in the same time... even with a LocationMatch. no?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top