if (count == 1) {
if (strEQ(POPp, DECLINE_CMD)) {generating it. Again one of the directive handlers has returned something, which was undef and boom we get this warning. Installing a warning trap, we have a whole lot of them, which you can see with the patch at the bottom:
handler TestDirective::perlloadmodule::MyTest didn't return a valid return value!. handler ServerTest didn't return a valid return value!. ... handler MyTest6 didn't return a valid return value!. handler MyTest6 didn't return a valid return value!.
again we have the same problem of making assumption regarding the return value from a callback. So we need to decide whether we require directive handlers to return a valid status (APR::SUCCESS?) or just fix the DECLINE_CMD case with:
if (count == 1) {
- if (strEQ(POPp, DECLINE_CMD)) {
+ SV *sv = POPs;
+ if (SvPOK(sv) && strEQ(SvPVX(sv), DECLINE_CMD)) {
retval = DECLINE_CMD;
}
}Index: src/modules/perl/modperl_module.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_module.c,v
retrieving revision 1.15
diff -u -r1.15 modperl_module.c
--- src/modules/perl/modperl_module.c 4 Jun 2003 16:50:37 -0000 1.15
+++ src/modules/perl/modperl_module.c 10 Oct 2003 21:58:55 -0000
@@ -438,9 +438,16 @@
SPAGAIN; if (count == 1) {
- if (strEQ(POPp, DECLINE_CMD)) {
+ SV *sv = POPs;
+ if (SvPOK(sv) && strEQ(SvPVX(sv), DECLINE_CMD)) {
retval = DECLINE_CMD;
}
+ else {
+ Perl_warn(aTHX_
+ "handler %s didn't return a valid return value!",
+ info->func_name);
+ }
+
}PUTBACK;
__________________________________________________________________ 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
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
