[prev] [thread] [next] [lurker] [Date index for 2003/08/08]
Author: richardc Date: 2003-08-08 11:15:30 +0100 (Fri, 08 Aug 2003) New Revision: 1292 Modified: trunk/siesta/Config.pm.in trunk/siesta/bin/nacho Log: actually fix the -d -f thing Modified: trunk/siesta/Config.pm.in =================================================================== --- trunk/siesta/Config.pm.in 2003-08-08 10:02:19 UTC (rev 1291) +++ trunk/siesta/Config.pm.in 2003-08-08 10:15:30 UTC (rev 1292) @@ -91,7 +91,23 @@ =cut -sub import { + +sub load_from { + shift; + my $file = shift; + $config->file($file) if -e $file; + + @STORAGE = ($config->get('storage_dsn'), + $config->get('storage_user'), + $config->get('storage_pass')), + $MESSAGES = $config->get('messages'); + $ARCHIVE = $config->get('archive'); + $LOG_PATH = $config->get('log_path'); + $LOG_LEVEL = $config->get('log_level'); +} + + +BEGIN { $ROOT = '@@ROOT@@'; $CONFIG_FILE = '@@ROOT@@/siesta.conf' unless defined $CONFIG_FILE; @@ -126,16 +142,7 @@ DEFAULT => undef, }, ); - - $config->file($CONFIG_FILE) if -e $CONFIG_FILE; - - @STORAGE = ($config->get('storage_dsn'), - $config->get('storage_user'), - $config->get('storage_pass')), - $MESSAGES = $config->get('messages'); - $ARCHIVE = $config->get('archive'); - $LOG_PATH = $config->get('log_path'); - $LOG_LEVEL = $config->get('log_level'); + __PACKAGE__->load_from( $CONFIG_FILE ); } 1; Modified: trunk/siesta/bin/nacho =================================================================== --- trunk/siesta/bin/nacho 2003-08-08 10:02:19 UTC (rev 1291) +++ trunk/siesta/bin/nacho 2003-08-08 10:15:30 UTC (rev 1292) @@ -19,8 +19,7 @@ if ($ARGV[0] eq '-f') { shift; - $Siesta::Config::CONFIG_FILE = shift; - Siesta::Config->import; # reimport - reloads the config file + Siesta::Config->load_from( shift ); next; } @@ -140,7 +139,8 @@ $list->set_plugins( unsub => qw( UnSubscribe ) ); print "Created the new list '$list_id' <$post_addr>\n"; - print "nacho show-alias will show you what to include in /etc/aliases\n"; + print "put this in your /etc/aliases"; + $commands{'show-alias'}->( $list_id); };
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52