[LON-CAPA-cvs] cvs: loncom / LondConnection.pm

foxr lon-capa-cvs@mail.lon-capa.org
Mon, 22 Dec 2003 11:03:17 -0000


foxr		Mon Dec 22 06:03:17 2003 EDT

  Modified files:              
    /loncom	LondConnection.pm 
  Log:
  Debugging support for local configuration
  
  
Index: loncom/LondConnection.pm
diff -u loncom/LondConnection.pm:1.20 loncom/LondConnection.pm:1.21
--- loncom/LondConnection.pm:1.20	Thu Dec 11 18:16:06 2003
+++ loncom/LondConnection.pm	Mon Dec 22 06:03:17 2003
@@ -1,7 +1,7 @@
 #   This module defines and implements a class that represents
 #   a connection to a lond daemon.
 #
-# $Id: LondConnection.pm,v 1.20 2003/12/11 23:16:06 albertel Exp $
+# $Id: LondConnection.pm,v 1.21 2003/12/22 11:03:17 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -67,7 +67,7 @@
     my $perlvarref = read_conf('loncapa.conf');
     %perlvar    = %{$perlvarref};
     my $hoststab   = read_hosts(
-				"$perlvar{'lonTabDir'}/hosts.tab") || 
+				"$perlvar{lonTabDir}/hosts.tab") || 
 				die "Can't read host table!!";
     %hostshash  = %{$hoststab};
     $ConfigRead = 1;
@@ -792,6 +792,9 @@
     my %perlvar;
     foreach my $filename (@conf_files,'loncapa_apache.conf')
       {
+	  if($DebugLevel > 3) {
+	      print("Going to read $confdir.$filename\n");
+	  }
 	open(CONFIG,'<'.$confdir.$filename) or
 	    die("Can't read $confdir$filename");
 	while (my $configline=<CONFIG>)
@@ -805,9 +808,15 @@
 	  }
 	close(CONFIG);
       }
+    if($DebugLevel > 3) {
+	print "Dumping perlvar:\n";
+	foreach my $var (keys %perlvar) {
+	    print "$var = $perlvar{$var}\n";
+	}
+    }
     my $perlvarref=\%perlvar;
-    return ($perlvarref);
-  }
+    return $perlvarref;
+}
 
 #---------------------- Subroutine read_hosts: Read a LON-CAPA hosts.tab
 # formatted configuration file.