[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl-cvs
Subject: cvs commit: modperl-2.0 Changes
From: stas () apache ! org
Date: 2003-06-03 0:09:04
[Download RAW message or body]
stas 2003/06/02 17:09:04
Modified: lib/Apache Reload.pm
. Changes
Log:
Apache::Reload: add a new config variable:
ReloadConstantRedefineWarnings to optionally shut off the constant sub
redefine warnings
Revision Changes Path
1.11 +11 -0 modperl-2.0/lib/Apache/Reload.pm
Index: Reload.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Reload.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Reload.pm 8 May 2003 00:31:27 -0000 1.10
+++ Reload.pm 3 Jun 2003 00:09:04 -0000 1.11
@@ -63,6 +63,10 @@
my $TouchFile = ref($o) && $o->dir_config("ReloadTouchFile");
+ my $ConstantRedefineWarnings = ref($o) &&
+ (lc($o->dir_config("ReloadConstantRedefineWarnings") || '') eq 'off')
+ ? 0 : 1;
+
my $TouchModules;
if ($TouchFile) {
@@ -141,6 +145,8 @@
undef %{$symref};
}
no warnings FATAL => 'all';
+ local $SIG{__WARN__} = \&skip_redefine_const_sub_warn
+ unless $ConstantRedefineWarnings;
require $key;
warn("Apache::Reload: process $$ reloading $key\n")
if $DEBUG;
@@ -149,6 +155,11 @@
}
return Apache::OK;
+}
+
+sub skip_redefine_const_sub_warn {
+ return if $_[0] =~ /^Constant subroutine [\w:]+ redefined at/;
+ CORE::warn(@_);
}
1;
1.191 +4 -0 modperl-2.0/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -r1.190 -r1.191
--- Changes 30 May 2003 12:56:01 -0000 1.190
+++ Changes 3 Jun 2003 00:09:04 -0000 1.191
@@ -12,6 +12,10 @@
=item 1.99_10-dev
+Apache::Reload: add a new config variable:
+ReloadConstantRedefineWarnings to optionally shut off the constant sub
+redefine warnings [Stas]
+
implement $parms->info. directive handlers should now be complete.
[Geoffrey Young]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic