perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: help getting started ..
Date Thu, 05 Sep 2002 10:54:57 GMT
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 .....


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
/* prototype to pass -Wmissing-prototypes */
WrapXS/Apache/HookRun/HookRun.c:        Perl_croak(aTHX_ "Usage: 
WrapXS/Apache/HookRun/HookRun.c:        RETVAL = ap_run_access_checker(r);
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:
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:

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message