Path to my module and APR::Socket::send() usage

2010-10-21 Thread Alexander Farber
Hello mod_perl 2 users, I have 3 questions please: 1) How do you specify the path to your custom module, so that Apache 2 can load it at the startup? I'm using mod_perl-2.0.4-6.el5 with CentOS Linux 5.5 and have the following lines in /etc/httpd/conf.d/perl.conf: LoadModule perl

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Alexander Farber
For 3) I unfortunately get: [error] Can't locate object method "log" via package "Apache2::ServerRec" at /etc/httpd/SocketPolicy.pm line 39.\n when I try: sub handler { my $c = shift; my $sock = $c->client_socket; # set the socket to the blocking mode $sock->opt

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Torsten Förtsch
On Thursday, October 21, 2010 15:21:37 Alexander Farber wrote: > [error] Can't locate object method "log" via package > "Apache2::ServerRec" at /etc/httpd/SocketPolicy.pm line 39.\n you probably miss a "use Apache2::ServerRec ()" and perhaps a "use Apache2::Log ()" in your code. Further to your

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Ryan Gies
On 10/21/2010 08:35 AM, Alexander Farber wrote: Hello mod_perl 2 users, I have 3 questions please: 1) How do you specify the path to your custom module, so that Apache 2 can load it at the startup? To adjust @INC at start-up: PerlSwitches -I /my/perl/lib Or, you can run a perl

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Alexander Farber
Thanks Ryan and Torsten - 2010/10/21 Torsten Förtsch : > On Thursday, October 21, 2010 15:21:37 Alexander Farber wrote: >>  [error] Can't locate object method "log" via package >> "Apache2::ServerRec" at /etc/httpd/SocketPolicy.pm line 39.\n > > you probably miss a "use Apache2::ServerRec ()" and

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Alexander Farber
Or maybe I've looked wrong and you do need to loop in Perl? On Thu, Oct 21, 2010 at 5:20 PM, Alexander Farber wrote: > 2) I've looked at > http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/sendrecv.c?view=markup >  If APR::Socket::send() is autogenerated from apr_socket_send() >  then th

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Alexander Farber
Even though my logs show that 1 send-call usually suffices (I have a site with 1 visitor/3 min), I've updated my script. Not sure if returning DECLINED is a good idea. And if you know a way to log into access_log instead of error_log, please tell me. Thank you Alex package SocketPolicy; use s

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread André Warnier
Alexander Farber wrote: Even though my logs show that 1 send-call usually suffices (I have a site with 1 visitor/3 min), I've updated my script. Not sure if returning DECLINED is a good idea. And if you know a way to log into access_log instead of error_log, please tell me. No. I have been lo