]> git.donarmstrong.com Git - infobot.git/commitdiff
showProc needs to come after require
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 31 Oct 2002 22:13:18 +0000 (22:13 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 31 Oct 2002 22:13:18 +0000 (22:13 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@570 c11ca15a-4712-0410-83d8-924469b57eb5

blootbot/src/modules.pl

index 36e3204529c8cd8d14ce3116e52ff6acbd518b06..f93f7865348765e044326c5dc9c213b13517a041 100644 (file)
@@ -77,8 +77,6 @@ sub loadCoreModules {
 }
 
 sub loadDBModules {
-    &status("Loading DB modules...");
-
     my $f = "$bot_src_dir/modules.pl";
     $moduleAge{$f} = (stat $f)[9];
 
@@ -88,13 +86,11 @@ sub loadDBModules {
            &ERROR("libdbd-mysql-perl is not installed!");
            exit 1;
        }
-       &showProc(" (DBI // mysql)");
-
-       &status("  using MySQL support.");
+       &status("Loading MySQL support.");
        $f = "$bot_src_dir/db_mysql.pl";
        require $f;
        $moduleAge{$f} = (stat $f)[9];
-
+       &showProc(" (DBI // mysql)");
     } elsif ($param{'DBType'} =~ /^pgsql$/i) {
 #      eval "use Pg";
        eval "use DBI";
@@ -102,17 +98,16 @@ sub loadDBModules {
            &ERROR("libpgperl is not installed!");
            exit 1;
        }
-       &showProc(" (pgsql)");
-
-       &status("  using pgsql support.");
+       &status("Loading pgsql support.");
        require "$bot_src_dir/db_pgsql.pl";
-
+       &showProc(" (pgsql)");
     } elsif ($param{'DBType'} =~ /^dbm$/i) {
-
-       &status("  using Berkeley DBM support.");
-       require "$bot_src_dir/db_dbm.pl";
+       &status("Loading Berkeley DBM support.");
+       $f = "$bot_src_dir/db_dbm.pl";
+       require $f;
+       $moduleAge{$f} = (stat $f)[9];
+       &showProc(" $bot_src_dir/db_dbm.pl");
     } else {
-
        &status("DB support DISABLED.");
        return;
     }