Index: trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 4440)
+++ trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 4874)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.9 2005-06-30 02:35:06 jhoblitt Exp $
+# $Id: Server.pm,v 1.10 2005-08-25 01:44:32 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -12,4 +12,5 @@
 use DBI;
 use Nebulous::Util qw( :standard );
+use Nebulous::Server::Config;
 use Nebulous::Server::Log;
 use Nebulous::Server::SQL;
@@ -25,18 +26,12 @@
 my $db;
 
-sub setup {
-    my $self = shift;
-
-    my ( $dsn, $user, $passwd ) = validate_pos( @_,
-        {
-            type        => SCALAR,
-        },
-        {
-            type        => SCALAR,
-        },
-        {
-            type        => SCALAR,
-        },
-    );
+sub init {
+    my $self = shift;
+
+    # let Nebulous::Server::Config validate our params
+    my $config = Nebulous::Server::Config->init( @_ );
+
+    # log4perl is not avaliable until we call init()
+    Nebulous::Server::Log->init;
 
     $log = Log::Log4perl::get_logger( "Nebulous::Server" );
@@ -47,7 +42,7 @@
     eval {
         $db = DBI->connect(
-            $dsn,
-            $user,
-            $passwd,
+            $config->dsn,
+            $config->dbuser,
+            $config->dbpasswd,
             {
                 RaiseError => 1,
