develooper Front page | perl.cvs.qpsmtpd | Postings from November 2006

[svn:qpsmtpd] r674 - branches/0.3x/lib

From:
aqua
Date:
November 8, 2006 02:26
Subject:
[svn:qpsmtpd] r674 - branches/0.3x/lib
Message ID:
20061108102546.16654CBA84@x12.develooper.com
Author: aqua
Date: Wed Nov  8 02:25:45 2006
New Revision: 674

Modified:
   branches/0.3x/lib/Qpsmtpd.pm

Log:
Fix use of the default plugin dir path in the logging startup when no
plugin_dir is configured.  Slightly worsens duplication of code with
plugin_dir() to continue avoiding infinite recursion.


Modified: branches/0.3x/lib/Qpsmtpd.pm
==============================================================================
--- branches/0.3x/lib/Qpsmtpd.pm	(original)
+++ branches/0.3x/lib/Qpsmtpd.pm	Wed Nov  8 02:25:45 2006
@@ -23,6 +23,10 @@
   $configdir = $self->config_dir('plugin_dirs');
   $configfile = "$configdir/plugin_dirs";
   my @plugin_dirs = $self->_config_from_file($configfile,'plugin_dirs');
+  unless (@plugin_dirs) {
+    my ($name) = ($0 =~ m!(.*?)/([^/]+)$!);
+    @plugin_dirs = ( "$name/plugins" );
+  }
   
   my @loaded;
   for my $logger (@loggers) {



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About