From 26f689191da3e31b8c69ea75be1483cb5e485f64 Mon Sep 17 00:00:00 2001 From: Matt Sergeant Date: Mon, 27 Oct 2008 09:49:22 +0000 Subject: [PATCH] Support returning 0 values in config files (always worked on the second call due to the cache, but would return undef on the first call) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@955 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 603d853..b6574a3 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -159,8 +159,11 @@ sub config { return @config; } else { - return ($config[0] || $self->get_qmail_config($c, $type) || $defaults{$c}); - } + return $config[0] if defined($config[0]); + my $val = $self->get_qmail_config($c, $type); + return $val if defined($val); + return $defaults{$c}; + } } sub config_dir {