develooper Front page | perl.qpsmtpd.dev | Postings from March 2008

[svn:qpsmtpd] r862 - trunk/lib

From:
msergeant
Date:
March 18, 2008 08:19
Subject:
[svn:qpsmtpd] r862 - trunk/lib
Author: msergeant
Date: Tue Mar 18 08:19:20 2008
New Revision: 862

Modified:
   trunk/lib/Qpsmtpd.pm

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


Modified: trunk/lib/Qpsmtpd.pm
==============================================================================
--- trunk/lib/Qpsmtpd.pm	(original)
+++ trunk/lib/Qpsmtpd.pm	Tue Mar 18 08:19:20 2008
@@ -181,7 +181,7 @@
   # CDB config support really should be moved to a plugin
   if ($type and $type eq "map")  {
     unless (-e $configfile . ".cdb") {
-        $_config_cache->{$config} = [];
+        $_config_cache->{$config} ||= [];
         return +{};
     }
     eval { require CDB_File };
@@ -208,7 +208,7 @@
 sub _config_from_file {
   my ($self, $configfile, $config, $visited) = @_;
   unless (-e $configfile) {
-      $_config_cache->{$config} = [];
+      $_config_cache->{$config} ||= [];
       return;
   }
 



Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About