[EMAIL PROTECTED] wrote:
stas        2002/12/06 00:00:22

  Modified:    src/modules/perl modperl_mgv.c
  Log:
  report that the handler wasn't found in class 'foo' only if that class was
  actually loaded. otherwise a lot of misleading trace reports get printed
  for handlers whose modules weren't loaded yet.
I'm not happy about polluting the code with #ifdef, but also didn't want to add any overhead with real code only for tracing. Ideas for a more elegant solutions are welcome.

Revision Changes Path
1.20 +7 -2 modperl-2.0/src/modules/perl/modperl_mgv.c
Index: modperl_mgv.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_mgv.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- modperl_mgv.c 6 Dec 2002 07:58:22 -0000 1.19
+++ modperl_mgv.c 6 Dec 2002 08:00:21 -0000 1.20
@@ -323,8 +323,13 @@
return 1;
}
- MP_TRACE_h(MP_FUNC, "`%s' not found in class `%s'\n",
- handler_name, name);
+#ifdef MP_TRACE
+ /* complain only if the class was actually loaded/created */
+ if (stash) {
+ MP_TRACE_h(MP_FUNC, "`%s' not found in class `%s'\n",
+ handler_name, name);
+ }
+#endif
return 0;
}

--


__________________________________________________________________
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]

Reply via email to