Re: mod_perl installation and non-standard perl path in FreeBSD
~ On Mon, 19 Apr 2004 14:13:00 -0700, Stas Bekman wrote Subject: Re: mod_perl installation and non-standard perl path in FreeBSD ~ Andy Harrison wrote: Hoping there might be another FreeBSD user here who may have been through this already... For reasons I don't want to trouble you with, I had to install the latest perl freebsd port into /usr/local/rt3/perl/ and now I need to get mod_perl to compile against that version. Unless I miss something specific to FreeBSD ports, the whole thing should be as easy as doing: /usr/local/rt3/perl/bin/perl Makefile.PL ... make make test make install I don't understand why are you trying to mess up with env vars at all. You obviously miss the first step, i.e. 'perl Makefile.PL' I was hoping to get it working within the ports framework for future maintainability. Since I'm not using a standard dir anyway, it doesn't look like it's going to be possible or worth any further effort. Anyway, one more question related to this. When building via apaci, it says to use APACHE_PREFIX. What exactly is it looking for? FreeBSD doesn't install apache in a traditional spot all under one directory, such as /usr/local/apache. It seems reasonable that it is looking for the directory where libperl.so is going to live (/usr/local/libexec/apache under FreeBSD). Is this a good assumption? -- Andy Harrison Great Works Internet System Operations (full headers for details) -- Andy Harrison Great Works Internet System Operations (full headers for details) -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: mod_perl installation and non-standard perl path in FreeBSD
Andy Harrison wrote: ~ On Mon, 19 Apr 2004 14:13:00 -0700, Stas Bekman wrote Subject: Re: mod_perl installation and non-standard perl path in FreeBSD ~ Andy Harrison wrote: Hoping there might be another FreeBSD user here who may have been through this already... For reasons I don't want to trouble you with, I had to install the latest perl freebsd port into /usr/local/rt3/perl/ and now I need to get mod_perl to compile against that version. Unless I miss something specific to FreeBSD ports, the whole thing should be as easy as doing: /usr/local/rt3/perl/bin/perl Makefile.PL ... make make test make install I don't understand why are you trying to mess up with env vars at all. You obviously miss the first step, i.e. 'perl Makefile.PL' I was hoping to get it working within the ports framework for future maintainability. Since I'm not using a standard dir anyway, it doesn't look like it's going to be possible or worth any further effort. Anyway, one more question related to this. When building via apaci, it says to use APACHE_PREFIX. What exactly is it looking for? FreeBSD doesn't install apache in a traditional spot all under one directory, such as /usr/local/apache. It seems reasonable that it is looking for the directory where libperl.so is going to live (/usr/local/libexec/apache under FreeBSD). Is this a good assumption? I guess not. http://perl.apache.org/docs/1.0/guide/install.html#APACHE_PREFIX mp1's APACHE_PREFIX == apache 1.3's --prefix= If it doesn't apply under FreeBSD, don't use it. Instead use APACI_ARGS with an appropriate --libexecdir= flag. Please send me a patch to make this clear in the docs. Thanks. -- __ Stas BekmanJAm_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 -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
perl 5.8.4 is out
FYI http://search.cpan.org/~nwclark/perl-5.8.4/pod/perl584delta.pod Original Message Subject: 5.8.4 Date: Thu, 22 Apr 2004 16:56:22 +0100 From: Nicholas Clark [EMAIL PROTECTED] To: [EMAIL PROTECTED] I have a Gumbie Cat in mind, her name is Jennyanydots; The curtain-cord she likes to wind, and tie it into sailor-knots. She sits upon the window-sill, or anything that's smooth and flat: She sits and sits and sits and sits -- and that's what makes a Gumbie Cat! But when the day's hustle and bustle is done, Then the Gumbie Cat's work is but hardly begun. She thinks that the cockroaches just need employment To prevent them from idle and wanton destroyment. So she's formed, from that a lot of disorderly louts, A troop of well-disciplined helpful boy-scouts, With a purpose in life and a good deed to do-- And she's even created a Beetles' Tattoo. So for Old Gumbie Cats let us now give three cheers -- On whom well-ordered households depend, it appears. from 'The Old Gumbie Cat' by T.S. Elliot Get it while its hot: http://opensource.fotango.com/~nclark/perl-5.8.4.tar.bz2 http://opensource.fotango.com/~nclark/perl-5.8.4.tar.gz coming soon to a CPAN near you: ftp://ftp.perl.org/pub/CPAN/src/perl-5.8.4.tar.bz2 ftp://ftp.perl.org/pub/CPAN/src/perl-5.8.4.tar.gz md5sums are 3eb135afd0114f4e1acdd4ad6b8fd947 perl-5.8.4.tar.bz2 912050a9cb6b0f415b76ba56052fb4cf perl-5.8.4.tar.gz Nicholas Clark -- -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
FYI: metux MPM Apache project
This project was mention on httpd-dev: http://www.metux.de/mpm/en/?patpage= The Metux MPM is an module for the Apache 2.0 Webserver which allows it to run several VirtualHosts under different User-IDs. Some other modules such as mod_cgid allow functionality which is superficially similar. Metux MPM allows you to control the process' user IDs from the central configuration, on the basis of individual or multiple VirtualHosts directives. So if you are after this functionality, (e.g. you are an ISP) give it a try. -- __ Stas BekmanJAm_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 -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: mod_perl installation and non-standard perl path in FreeBSD
Hi Andy, I use Apache/mod_perl under FreeBSD. I compile with Apachetoolbox[1] which is super easy. Here are the custom settings I use: --suexec-caller=www \ --suexec-docroot=/web \ --disable-rule=EXPAT \ # if using mod_ssl --enable-rule=EAPI Otherwise, I let toolbox do the work. Check the docs but I'm pretty sure that the APACHE_PREFIX path is where apache will be installed. William [1] http://apachetoolbox.com/ -- Knowmad Services Inc. http://www.knowmad.com -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
BerkeleyDB with mod perl
I know this isn't exactly mod perl specific, but since there isn't a mailing list for BerkeleyDB and this is an issue I know people using BerkeleyDB and mod perl have probably run accross I thought I would post it here. I'm using the latest BerkeleyDB perl module on freebsd 5.2 with mod perl 1.xx. Following is the BerkeleyDB code I am using. When I start running lots of concurrent processes that run db_put I get the error 'Locker does not exist' in $BerkeleyDB::Error and db_put returns 'Invalid argument'. I must be setting up the environment incorrectly somehow. I am trying to use the BerkeleyDB concurrent data store mode which I assumed would handle all the locking for me. my %Cache; my $env = new BerkeleyDB::Env( -Home = '/tmp/bdb', -Flags = DB_INIT_CDB | DB_CREATE | DB_INIT_MPOOL, ) or die can't create BerkelyDB::Env: $!; my $bdb = tie %Cache, 'BerkeleyDB::Hash', -Filename = '/tmp/bdb/bdbfile', -Flags= DB_CREATE, -Mode = 0640, -Env = $env or die (Can't tie to /tmp/bdb/bdbdfile: $!); My db_put looks like this: my $status = $bdb-db_put($key,$value); Chris -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: BerkeleyDB with mod perl
On Thu, 2004-04-22 at 15:55, Chris Ochs wrote: I'm using the latest BerkeleyDB perl module on freebsd 5.2 with mod perl 1.xx. Following is the BerkeleyDB code I am using. When I start running lots of concurrent processes that run db_put I get the error 'Locker does not exist' in $BerkeleyDB::Error and db_put returns 'Invalid argument'. Any chance you might be opening the db handle before forking, i.e. in your startup.pl? I suspect that would cause problems. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
[OT] Re: BerkeleyDB with mod perl
Hi Chris, I sympathize with you. I've been through my share of problems with BerkeleyDB as well. So far, I haven't had problems using it with mod_perl. I wrote a stress test tool[1] to prove to myself that BerkeleyDB was indeed safe to use in concurrent processes. You can set it to run as many processes doing as many inserts and reads as you would like. You may want to run that against a copy of your database to see if it exposes any errors. My mod_perl setup is on a Windows 2000 system and seems to be stable. I setup my environment in the same way that you are doing except that I pass in -ErrFile to the BerkeleyDB::Env setup. You may want to try that to see if it provides any more details for you. The only other suggestion I would make is to try without the tied interface if you don't have to change too much code. Since you're using db_put, you could setup just the handle via the following: my $bdb = new BerkeleyDB::Btree -Flags= DB_CREATE, -Filename = $dbfile, -Env = $env, or die Cannot open file $dbfile: $! - '$BerkeleyDB::Error'\n; Good luck and let us know if you find a solution, William [1] http://perlmonks.org/index.pl?node_id=330510 -- Knowmad Services Inc. http://www.knowmad.com -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: BerkeleyDB with mod perl
On Thu, Apr 22, 2004 at 04:12:51PM -0400, Perrin Harkins wrote: Any chance you might be opening the db handle before forking, i.e. in your startup.pl? I suspect that would cause problems. Hi Perrin, My gut reaction is Yes, this makes sense. However, I'm scratching my head trying to understand why. It seems that all the children would share the same locked environment. But perhaps, they shouldn't be sharing the same handle (is this the equivalent of a connection?) to that environment. Is that where the problem lies? Does each child need to have a separate handle? Thanks, William -- Knowmad Services Inc. http://www.knowmad.com -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: BerkeleyDB with mod perl
Sheesh yes I forgot to say that I set the environment and open the db handle in startup.pl. If I set the environment in startup.pl but open the db handle in my perl handler every time the page is accessed the performance drops by about 300%, but it does make the errors go away. Chris - Original Message - From: Perrin Harkins [EMAIL PROTECTED] To: Chris Ochs [EMAIL PROTECTED] Cc: Modperl List [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 1:12 PM Subject: Re: BerkeleyDB with mod perl On Thu, 2004-04-22 at 15:55, Chris Ochs wrote: I'm using the latest BerkeleyDB perl module on freebsd 5.2 with mod perl 1.xx. Following is the BerkeleyDB code I am using. When I start running lots of concurrent processes that run db_put I get the error 'Locker does not exist' in $BerkeleyDB::Error and db_put returns 'Invalid argument'. Any chance you might be opening the db handle before forking, i.e. in your startup.pl? I suspect that would cause problems. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: BerkeleyDB with mod perl
On Thu, 2004-04-22 at 16:27, William McKee wrote: My gut reaction is Yes, this makes sense. However, I'm scratching my head trying to understand why. There are file handles involved. You can't fork with an open file and expect to be able to do things with it from each process, at least not without awareness and coordination between them. I don't know enough about BDB internals to say for sure what would happen, but this sort of thing is often a problem with forking servers. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: BerkeleyDB with mod perl
On Thu, 2004-04-22 at 16:34, Chris Ochs wrote: If I set the environment in startup.pl but open the db handle in my perl handler every time the page is accessed the performance drops by about 300%, but it does make the errors go away. There is no need to open the handle every time. You can open it once and put it in a global. Just do it after the fork. It's the same idea as Apache::DBI. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: BerkeleyDB with mod perl
Yep sticking it in a global and handling it like Apache::DBI works. - Original Message - From: Perrin Harkins [EMAIL PROTECTED] To: Chris Ochs [EMAIL PROTECTED] Cc: Modperl List [EMAIL PROTECTED] Sent: Thursday, April 22, 2004 1:36 PM Subject: Re: BerkeleyDB with mod perl On Thu, 2004-04-22 at 16:34, Chris Ochs wrote: If I set the environment in startup.pl but open the db handle in my perl handler every time the page is accessed the performance drops by about 300%, but it does make the errors go away. There is no need to open the handle every time. You can open it once and put it in a global. Just do it after the fork. It's the same idea as Apache::DBI. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
cvs commit: modperl-2.0/t/conf modperl_extra.pl
stas2004/04/22 13:00:02 Modified:t/conf modperl_extra.pl Log: as of 5.8.4 when spawning ithreads we get an annoying Attempt to free unreferenced scalar ... perlbug #24660 because of $gtop's CLONE'd object, so skip it for now Revision ChangesPath 1.43 +11 -1 modperl-2.0/t/conf/modperl_extra.pl Index: modperl_extra.pl === RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v retrieving revision 1.42 retrieving revision 1.43 diff -u -u -r1.42 -r1.43 --- modperl_extra.pl 2 Apr 2004 01:55:59 - 1.42 +++ modperl_extra.pl 22 Apr 2004 20:00:02 - 1.43 @@ -318,8 +318,18 @@ use warnings; use strict; +# XXX: as of 5.8.4 when spawning ithreads we get an annoying +# Attempt to free unreferenced scalar ... perlbug #24660 +# because of $gtop's CLONE'd object, so skip it for now + # GTop v0.12 is the first version that will work under threaded mpms -use constant HAS_GTOP = eval { require GTop GTop-VERSION = 0.12 }; +use constant MPM_IS_THREADED = eval { +require Apache::Build; +Apache::Build-build_config-mpm_is_threaded(); +}; +use constant HAS_GTOP = eval { +!MPM_IS_THREADED require GTop GTop-VERSION = 0.12 +}; my $gtop = HAS_GTOP ? GTop-new : undef; my @attrs = qw(size vsize resident share rss);
cvs commit: modperl-2.0/t/conf modperl_extra.pl
stas2004/04/22 14:36:11 Modified:t/conf modperl_extra.pl Log: perlbug #24660 affects any threaded perl that spawns threads, not only threaded mpm. disable creating of gtop objects for ithreads enabled perl Revision ChangesPath 1.44 +5 -9 modperl-2.0/t/conf/modperl_extra.pl Index: modperl_extra.pl === RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v retrieving revision 1.43 retrieving revision 1.44 diff -u -u -r1.43 -r1.44 --- modperl_extra.pl 22 Apr 2004 20:00:02 - 1.43 +++ modperl_extra.pl 22 Apr 2004 21:36:11 - 1.44 @@ -320,16 +320,12 @@ # XXX: as of 5.8.4 when spawning ithreads we get an annoying # Attempt to free unreferenced scalar ... perlbug #24660 -# because of $gtop's CLONE'd object, so skip it for now - +# because of $gtop's CLONE'd object, so pretend that we have no gtop +# for now if perl is threaded # GTop v0.12 is the first version that will work under threaded mpms -use constant MPM_IS_THREADED = eval { -require Apache::Build; -Apache::Build-build_config-mpm_is_threaded(); -}; -use constant HAS_GTOP = eval { -!MPM_IS_THREADED require GTop GTop-VERSION = 0.12 -}; +use Config; +use constant HAS_GTOP = eval { !$Config{useithreads} +require GTop GTop-VERSION = 0.12 }; my $gtop = HAS_GTOP ? GTop-new : undef; my @attrs = qw(size vsize resident share rss);
cvs commit: modperl-2.0/t/response/TestVhost config.pm
stas2004/04/22 15:30:56 Modified:.Changes ModPerl-Registry/t/conf extra.conf.in t/conf extra.conf.in t/response/TestDirective perlrequire.pm t/response/TestPerl ithreads.pm t/response/TestVhost config.pm Log: significantly speedup the startup of threaded mpm test suite, by configuring only the minimal number of perl interprters to start Revision ChangesPath 1.359 +3 -0 modperl-2.0/Changes Index: Changes === RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.358 retrieving revision 1.359 diff -u -u -r1.358 -r1.359 --- Changes 8 Apr 2004 20:47:41 - 1.358 +++ Changes 22 Apr 2004 22:30:55 - 1.359 @@ -12,6 +12,9 @@ =item 1.99_14-dev +significantly speedup the startup of threaded mpm test suite, by +configuring only the minimal number of perl interprters to start [Stas] + make APR::Socket::opt_(set|get) working (and change the previous behavior) [Stas] 1.15 +9 -0 modperl-2.0/ModPerl-Registry/t/conf/extra.conf.in Index: extra.conf.in === RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/conf/extra.conf.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -u -r1.14 -r1.15 --- extra.conf.in 26 Jan 2004 16:10:07 - 1.14 +++ extra.conf.in 22 Apr 2004 22:30:56 - 1.15 @@ -1,5 +1,14 @@ #this file will be Include-d by @ServerRoot@/httpd.conf +# Adjust PerlInterpMax and PerlInterpMaxSpare if the requirements change +# at the moment all tests require only 1 interprter +IfDefine PERL_USEITHREADS +PerlInterpStart 1 +PerlInterpMax 1 +PerlInterpMinSpare 1 +PerlInterpMaxSpare 1 +/IfDefine + # make sure that we test under Taint and warnings mode enabled PerlSwitches -wT 1.10 +30 -0 modperl-2.0/t/conf/extra.conf.in Index: extra.conf.in === RCS file: /home/cvs/modperl-2.0/t/conf/extra.conf.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -u -r1.9 -r1.10 --- extra.conf.in 15 Nov 2003 19:36:00 - 1.9 +++ extra.conf.in 22 Apr 2004 22:30:56 - 1.10 @@ -1,3 +1,33 @@ +# The following tests require more then 1 interpreters during the same +# request: +# +# perls Test +# --- +# 2 t/modules/apache_status +# 2 t/filter/both_str_req_proxy +# 2 t/modules/proxy +# +# the following tests will clone a new perl interpreter via +# ithreads.pm regardless of how many interpreters mod_perl has: +# +# t/perl/ithreads +# t/perl/ithreads2 +# +# therefore we need at most 2 interpreters, the missing one loading on +# demand, but we start only with 1, so the startup is quick, +# especially since we immediately restart. We also want MaxSpare to be +# the same as Max, since we have more than one test that requires more +# than one interpreter, so don't waste time to kill and start a new +# one later -- keep it around once spawned +# +# Adjust PerlInterpMax and PerlInterpMaxSpare if the requirements change +IfDefine PERL_USEITHREADS +PerlInterpStart 1 +PerlInterpMax 2 +PerlInterpMinSpare 1 +PerlInterpMaxSpare 2 +/IfDefine + # make sure that we test under Taint and warnings mode enabled PerlSwitches -wT 1.13 +4 -0 modperl-2.0/t/response/TestDirective/perlrequire.pm Index: perlrequire.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlrequire.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -u -r1.12 -r1.13 --- perlrequire.pm18 Apr 2003 06:18:58 - 1.12 +++ perlrequire.pm22 Apr 2004 22:30:56 - 1.13 @@ -66,6 +66,10 @@ IfDefine PERL_USEITHREADS # a new interpreter pool PerlOptions +Parent +PerlInterpStart 1 +PerlInterpMax 1 +PerlInterpMinSpare 1 +PerlInterpMaxSpare 1 /IfDefine # use test system's @INC 1.8 +4 -0 modperl-2.0/t/response/TestPerl/ithreads.pm Index: ithreads.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestPerl/ithreads.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -u -r1.7 -r1.8 --- ithreads.pm 27 Oct 2003 21:14:32 - 1.7 +++ ithreads.pm 22 Apr 2004 22:30:56 - 1.8 @@ -76,6 +76,10 @@ IfDefine PERL_USEITHREADS # a new interpreter pool
cvs commit: modperl-2.0/t/conf extra.conf.in
stas2004/04/22 15:54:09 Modified:t/conf extra.conf.in Log: spelling Revision ChangesPath 1.11 +2 -2 modperl-2.0/t/conf/extra.conf.in Index: extra.conf.in === RCS file: /home/cvs/modperl-2.0/t/conf/extra.conf.in,v retrieving revision 1.10 retrieving revision 1.11 diff -u -u -r1.10 -r1.11 --- extra.conf.in 22 Apr 2004 22:30:56 - 1.10 +++ extra.conf.in 22 Apr 2004 22:54:09 - 1.11 @@ -1,5 +1,5 @@ -# The following tests require more then 1 interpreters during the same -# request: +# The following tests require more than one interpreter during the +# same request: # # perls Test # ---
cvs commit: modperl-2.0 Changes
stas2004/04/22 16:14:32 Modified:src/modules/perl modperl_util.h t/protocol/TestProtocol echo.pm xs/APR/Socket APR__Socket.h xs/tables/current/ModPerl FunctionTable.pm .Changes Log: go back to the croak-on-error interface Revision ChangesPath 1.55 +0 -12 modperl-2.0/src/modules/perl/modperl_util.h Index: modperl_util.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v retrieving revision 1.54 retrieving revision 1.55 diff -u -u -r1.54 -r1.55 --- modperl_util.h8 Apr 2004 20:47:41 - 1.54 +++ modperl_util.h22 Apr 2004 23:14:31 - 1.55 @@ -72,18 +72,6 @@ } \ } while (0) - -/* runs a given code and if failed sets $APR::err to the error message - * and returns PL_sv_undef */ -#define MP_APR_RETURN_ON_FAILURE(rc_run) do { \ -apr_status_t rc = (rc_run); \ -if (rc != APR_SUCCESS) { \ -GV *gv = gv_fetchpv(APR::err, GV_ADDMULTI, SVt_PV); \ -sv_setpv(GvSV(gv), modperl_apr_strerror(rc)); \ -return PL_sv_undef; \ -} \ -} while (0) - /* check whether the response phase has been initialized already */ #define MP_CHECK_WBUCKET_INIT(func) \ if (!rcfg-wbucket) { \ 1.6 +1 -7 modperl-2.0/t/protocol/TestProtocol/echo.pm Index: echo.pm === RCS file: /home/cvs/modperl-2.0/t/protocol/TestProtocol/echo.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -u -r1.5 -r1.6 --- echo.pm 8 Apr 2004 20:47:41 - 1.5 +++ echo.pm 22 Apr 2004 23:14:31 - 1.6 @@ -19,17 +19,11 @@ # on some platforms (e.g. OSX/Solaris) httpd hands us a # non-blocking socket my $nonblocking = $socket-opt_get(APR::SO_NONBLOCK); -die failed to \$socket-opt_get: $ARP::err -unless defined $nonblocking; if ($nonblocking) { -my $prev_value = $socket-opt_set(APR::SO_NONBLOCK = 0); -die failed to \$socket-opt_set: $ARP::err -unless defined $prev_value; +my $success = $socket-opt_set(APR::SO_NONBLOCK = 0); # test that we really are in the non-blocking mode $nonblocking = $socket-opt_get(APR::SO_NONBLOCK); -die failed to \$socket-opt_get: $ARP::err -unless defined $nonblocking; die failed to set non-blocking mode if $nonblocking; } 1.6 +7 -10 modperl-2.0/xs/APR/Socket/APR__Socket.h Index: APR__Socket.h === RCS file: /home/cvs/modperl-2.0/xs/APR/Socket/APR__Socket.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -u -r1.5 -r1.6 --- APR__Socket.h 8 Apr 2004 20:47:41 - 1.5 +++ APR__Socket.h 22 Apr 2004 23:14:31 - 1.6 @@ -64,20 +64,17 @@ return t; } -static MP_INLINE SV * -mpxs_APR__Socket_opt_get(pTHX_ apr_socket_t *socket, apr_int32_t opt) +static MP_INLINE +apr_int32_t mpxs_APR__Socket_opt_get(pTHX_ apr_socket_t *socket, apr_int32_t opt) { apr_int32_t val; -MP_APR_RETURN_ON_FAILURE(apr_socket_opt_get(socket, opt, val)); -return newSViv(val); +MP_FAILURE_CROAK(apr_socket_opt_get(socket, opt, val)); +return val; } -static MP_INLINE SV * -mpxs_APR__Socket_opt_set(pTHX_ apr_socket_t *socket, apr_int32_t opt, +static MP_INLINE +void mpxs_APR__Socket_opt_set(pTHX_ apr_socket_t *socket, apr_int32_t opt, apr_int32_t val) { -apr_int32_t oldval; -MP_APR_RETURN_ON_FAILURE(apr_socket_opt_get(socket, opt, oldval)); -MP_APR_RETURN_ON_FAILURE(apr_socket_opt_set(socket, opt, val)); -return newSViv(oldval); +MP_FAILURE_CROAK(apr_socket_opt_set(socket, opt, val)); } 1.152 +3 -3 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm Index: FunctionTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v retrieving revision 1.151 retrieving revision 1.152 diff -u -u -r1.151 -r1.152 --- FunctionTable.pm 14 Apr 2004 03:42:42 - 1.151 +++ FunctionTable.pm 22 Apr 2004 23:14:31 - 1.152 @@ -2,7 +2,7 @@ # !! # ! WARNING: generated by ModPerl::ParseSource/0.01 -# ! Tue Apr 13 18:00:36 2004 +# ! Thu Apr 22 13:15:57 2004 # ! do NOT edit, any changes will be lost ! # !! @@ -5406,7 +5406,7 @@ ] }, { -'return_type' = 'SV *', +'return_type' = 'apr_int32_t',