stas 01/10/16 22:35:34
Modified: ModPerl-Registry/lib/ModPerl RegistryCooker.pm
Log:
- add a D_NONE const
- now the DEBUG const can be overriden from httpd.conf
Revision Changes Path
1.2 +10 -7 modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
Index: RegistryCooker.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RegistryCooker.pm 2001/10/09 12:47:38 1.1
+++ RegistryCooker.pm 2001/10/17 05:35:34 1.2
@@ -49,20 +49,23 @@
# - see META's accross the file
#########################################################################
-# debug flag constants
+# debug constants
#
#########################################################################
+use constant D_NONE => 0;
use constant D_ERROR => 1;
use constant D_WARN => 2;
use constant D_COMPILE => 4;
use constant D_NOISE => 8;
-# use ModPerl::RegistryCooker::DEBUG constant if defined elsewhere
-# before the compilation of this package: D_NOISE devel mode (prod==0)
-#use constant DEBUG => ModPerl::RegistryCooker->can('DEBUG') || D_NOISE;
-#use Apache::ServerUtil;
-#use constant DEBUG => defined
Apache->server->dir_config('ModPerl::RegistryCooker::DEBUG') ?
Apache->server->dir_config('ModPerl::RegistryCooker::DEBUG') : D_NOISE;
-use constant DEBUG => D_NOISE;
+# can override the debug level in httpd.conf with:
+# PerlSetVar ModPerl::RegistryCooker::DEBUG 4
+# on the server level
+use Apache::ServerUtil ();
+use constant DEBUG =>
+ defined Apache->server->dir_config('ModPerl::RegistryCooker::DEBUG')
+ ? Apache->server->dir_config('ModPerl::RegistryCooker::DEBUG')
+ : D_NONE;
#########################################################################
# object's array index's access constants