[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

harris41 lon-capa-cvs@mail.lon-capa.org
Sat, 11 May 2002 20:42:00 -0000


harris41		Sat May 11 16:42:00 2002 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  also looking in loncapa.conf for PerlSetVAr
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.216 loncom/lonnet/perl/lonnet.pm:1.217
--- loncom/lonnet/perl/lonnet.pm:1.216	Wed May  8 13:40:03 2002
+++ loncom/lonnet/perl/lonnet.pm	Sat May 11 16:42:00 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.216 2002/05/08 17:40:03 www Exp $
+# $Id: lonnet.pm,v 1.217 2002/05/11 20:42:00 harris41 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2779,13 +2779,26 @@
 }
 
 BEGIN {
-# ------------------------------------------------------------ Read access.conf
+# ------------------------------------------- Read access.conf and loncapa.conf
+# (eventually access.conf will become deprecated)
     unless ($readit) {
+
 {
     my $config=Apache::File->new("/etc/httpd/conf/access.conf");
 
     while (my $configline=<$config>) {
-        if ($configline =~ /PerlSetVar/) {
+        if ($configline =~ /^[^\#]*PerlSetVar/) {
+	   my ($dummy,$varname,$varvalue)=split(/\s+/,$configline);
+           chomp($varvalue);
+           $perlvar{$varname}=$varvalue;
+        }
+    }
+}
+{
+    my $config=Apache::File->new("/etc/httpd/conf/loncapa.conf");
+
+    while (my $configline=<$config>) {
+        if ($configline =~ /^[^\#]*PerlSetVar/) {
 	   my ($dummy,$varname,$varvalue)=split(/\s+/,$configline);
            chomp($varvalue);
            $perlvar{$varname}=$varvalue;