Sylbert L wrote:
> Hi,
> 
> I'm just getting started with mod_perl. Was trying out the
> Apache::CommandServer sample code provided in the documentation, but I seem
> to get this error : Can't locate object method "run_access_checker" via
> package "Apache::RequestRec" at .....

add:

use Apache::HookRun ();

in mod_perl 2.0 methods are spread across many modules for the maximum 
performance and modularity. Once the API docs will be created you will 
just have to search for the method in question and load the module that 
has it. For now the easiest way is to grep the WrapXS dir:

.../modperl-2.0> grep -Ir run_access_checker WrapXS
WrapXS/Apache/HookRun/HookRun.xs:ap_run_access_checker(r)
WrapXS/Apache/HookRun/HookRun.c:XS(XS_Apache__RequestRec_run_access_checker); 
/* prototype to pass -Wmissing-prototypes */
WrapXS/Apache/HookRun/HookRun.c:XS(XS_Apache__RequestRec_run_access_checker)
WrapXS/Apache/HookRun/HookRun.c:        Perl_croak(aTHX_ "Usage: 
Apache::RequestRec::run_access_checker(r)");
WrapXS/Apache/HookRun/HookRun.c:        RETVAL = ap_run_access_checker(r);
WrapXS/Apache/HookRun/HookRun.c: 
newXS("Apache::RequestRec::run_access_checker", 
XS_Apache__RequestRec_run_access_checker, file);


> I'm using Apache 2.0.40, with mod_perl 2.0, Perl 5.8.0 on Red Hat Linux 7.2.
> 
> Also, I was just reading up on the mod_perl handlers. Is it possible to
> modify the working of apache, such that, it doesn't close the connection
> with the client ? and the connection with the client remains a constant one
> until the client explicitly closes the connection ? Can this be done at a
> module level ? Or do I need to modify the Apache source to acomplish the
> same ? If its possible with mod_perl, which PerlHandler(s) need to be used ?

HTTP is a stateless protocol and while you have the KeepAlive 
functionality to serve several requests over the same connection, you 
cannot rely on that to keep the connection open.

Most likely you need to write a protocol handler for that. See:
http://perl.apache.org/docs/2.0/user/handlers/protocols.html
for examples and explanations.

> Thanks a whole lot. I've just recently purchased Oreilly's "Writing Apache
> Modules with Perl and C", but  realized that it isn't too much of help, coz
> I'm dealing with Apache 2.0 & the book is all about Apache 1.3 & theres such
> a drastic difference between the two mod_perl implementations. Is there any
> other source of documentation / help I can find ?

Yes. There is enough to keep you busy for quite a while: 
http://perl.apache.org/docs/2.0/user/index.html

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to