I'll have to investigate; I was sure I tested this scenario.
Indeed, I *did* test this scenario, then I changed the global variable name. Unfortunately, vim does case-insensitive matches by default and I wound up changing the local variable name as well as the global variable name which is why the global never got set; it was being hidden by a my'd variable of the same name.
I think this is what I should check in. Keith, can you confirm this works for you???
John
=== lib/Qpsmtpd.pm ================================================================== --- lib/Qpsmtpd.pm (revision 476) +++ lib/Qpsmtpd.pm (local) @@ -36,16 +36,14 @@
my $configdir = $self->config_dir("loglevel");
my $configfile = "$configdir/loglevel";
- my ($TraceLevel) = $self->_config_from_file($configfile,'loglevel');
+ $TraceLevel = $self->_config_from_file($configfile,'loglevel');- if (defined($TraceLevel) and $TraceLevel =~ /^\d+$/) {
- $TraceLevel = $TraceLevel;
- }
- else {
+ unless (defined($TraceLevel) and $TraceLevel =~ /^\d+$/) {
$TraceLevel = LOGWARN; # Default if no loglevel file found.
}- $self->log(LOGINFO, "Loaded default logger");
+ # Can't call log() at this point due to infinite recursion
+ warn join(" ", $$, "Loaded default logger");return $TraceLevel; }
