rev 1277 - trunk/siesta/bin

[prev] [thread] [next] [lurker] [Date index for 2003/07/31]

From: richardc
Subject: rev 1277 - trunk/siesta/bin
Date: 15:08 on 31 Jul 2003
Author: richardc
Date: 2003-07-31 15:08:13 +0100 (Thu, 31 Jul 2003)
New Revision: 1277

Modified:
   trunk/siesta/bin/nacho
Log:
fix comment and layout


Modified: trunk/siesta/bin/nacho
==============================================================================
--- trunk/siesta/bin/nacho	2003-07-31 13:54:39 UTC (rev 1276)
+++ trunk/siesta/bin/nacho	2003-07-31 14:08:13 UTC (rev 1277)
@@ -14,31 +14,27 @@
 # this is a nasty hack, Class::DBI isn't so hot on this one
 use Siesta::Config;
 BEGIN {
-
     while (@ARGV) {
-        
         if ($ARGV[0] eq '-d') {
             shift;
             @Siesta::Config::STORAGE = split / /, shift;
-        
-        } elsif ($ARGV[0] eq '-f') {
+            next;
+        }
+        if ($ARGV[0] eq '-f') {
             shift;
             @Siesta::Config::CONFIG_FILE = shift;
+            next;
+        }
 
+        # do create-database before the require of Siesta::List
+        # otherwise Siesta::List &c will choke when they come to
+        # __PACKAGE__->set_up_table
 
-        # we have to check for create-database here
-        # because otherwise Class::DBI will have already
-        # been loaded by Siesta or Siesta::Member, found 
-        # no DB and then died on us.     
-        } elsif ($ARGV[0] eq 'create-database' ) {
+        if ($ARGV[0] eq 'create-database' ) {
             require Siesta::DBI;
             Siesta::DBI->init_db;
             exit;
-        } else {
-            last;
         }
-    }
-
 }
 
 eval {
@@ -641,12 +637,12 @@
 $commands{'create-backup'} = sub {
     my @members;
     my @lists;
-    
+
     # have we been passed a list
     if ($_[0]) {
         my $list = Siesta::List->load($_[0]) || die "No such list '$_[0]'\n";
         push @lists, $list;
-        @members = $list->members(); 
+        @members = $list->members();
 
     # other wise do everything
     } else {

Generated at 13:57 on 01 Jul 2004 by mariachi 0.52