
john at jsw4
Feb 17, 2000, 7:33 AM
Post #5 of 5
(688 views)
Permalink
|
Louis-David, I case it isn't clear from my message, I'm pretty new too. Anyway, I cannot reccomend the eagle book enough. (I am not associated in any way with the author or the publisher...other than this list.) About three chapters in you'll understand the answer to your question very clearly. Here's my attempt to paraphrase: There are two ways to run scripts under mod_perl. One is to write a "regular" perl script and to run it under Apache::Registry which is a module that sets up a "CGI-like" environment. (Except that it's blazingly fast because the scripts are compiled only once.) You can also use mod_perl to write Apache handlers - they directly handle requests to the server. An Apache handler actually participates in the whole web sever process, directly intercepting the request, manipulating it, and producing output from perl. Its cool because its perl, and they give you access to the access to the guts of the user's request. Actually I guess there is limited access to the "request object" in both methods, athough it seems a little less direct if one uses it in scripts running under ::Registry. I think one of the advantages of NOT using the resquest object for scripts running under ::Registry is that (in theory) if one uses CGI.pm the scripts will run under mod_perl or "regular" CGI. Although as Sean pointed out, the performance is different. But what the heck? My code is usually large and unwieldy, I'm used to it. My memory dealer loves me.<G> Between the Eagle Book and Stas' guide, ( http://perl.apache.org/guide ) I have needed no other mod_perl documentation ... except the list ... to write a fairly complex (for my first networked app) database application. Good Luck John > -----Original Message----- > From: Louis-David Mitterrand [mailto:cunctator [at] apartia] > Sent: Thursday, February 17, 2000 8:44 AM > To: Sean Chittenden > Cc: modperl [at] apache > Subject: Re: UN-Authenticating users? > > > On Tue, Feb 15, 2000 at 09:22:20AM -0800, Sean Chittenden wrote: > > > >I'm using CGI.pm under Apache::Registry, so I don't have > a nice $r > > > >object to see if I could do something like $c->user = > ""; which I'm > > > >guessing would barf anyway. > > > > Ugh... CGI.pm? Any chance you could move the use of CGI.pm to > > Apache::Request? 1001 times faster and doesn't have the > code bloat of the > > HTML generation. > > Sorry for the basic question but I'm still learning mod_perl's in and > outs: what do you mean by "move the use of CGI.pm to > Apache::Request" ? > > (I couldn't find a man page for Apache::Request on my Debian system) > > Cheers, > > -- > Louis-David Mitterrand - ldm [at] aparima - http://www.aparima.com > > "They told me I was gullible ... and I believed them!" >
|