fix config caching again - defaults weren't applied prior to this patch

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@862 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2008-03-18 15:19:20 +00:00
parent b7f39a9713
commit 8e3c0cf33a

View File

@ -181,7 +181,7 @@ sub get_qmail_config {
# CDB config support really should be moved to a plugin # CDB config support really should be moved to a plugin
if ($type and $type eq "map") { if ($type and $type eq "map") {
unless (-e $configfile . ".cdb") { unless (-e $configfile . ".cdb") {
$_config_cache->{$config} = []; $_config_cache->{$config} ||= [];
return +{}; return +{};
} }
eval { require CDB_File }; eval { require CDB_File };
@ -208,7 +208,7 @@ sub get_qmail_config {
sub _config_from_file { sub _config_from_file {
my ($self, $configfile, $config, $visited) = @_; my ($self, $configfile, $config, $visited) = @_;
unless (-e $configfile) { unless (-e $configfile) {
$_config_cache->{$config} = []; $_config_cache->{$config} ||= [];
return; return;
} }