[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lontest.pm /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 07 Apr 2005 08:15:42 -0000
albertel Thu Apr 7 04:15:42 2005 EDT
Modified files:
/loncom/interface loncommon.pm lontest.pm
/loncom/lonnet/perl lonnet.pm
Log:
- stop putting things into $ENV
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.258 loncom/interface/loncommon.pm:1.259
--- loncom/interface/loncommon.pm:1.258 Thu Apr 7 02:56:22 2005
+++ loncom/interface/loncommon.pm Thu Apr 7 04:15:41 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.258 2005/04/07 06:56:22 albertel Exp $
+# $Id: loncommon.pm,v 1.259 2005/04/07 08:15:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3135,18 +3135,14 @@
if (ref($env{$name})) {
#already have multiple values
push(@{ $env{$name} },$value);
- push(@{ $ENV{$name} },$value);
} else {
#first time seeing multiple values, convert hash entry to an arrayref
my $first=$env{$name};
undef($env{$name});
- undef($ENV{$name});
push(@{ $env{$name} },$first,$value);
- push(@{ $ENV{$name} },$first,$value);
}
} else {
$env{$name}=$value;
- $ENV{$name}=$value;
}
}
Index: loncom/interface/lontest.pm
diff -u loncom/interface/lontest.pm:1.16 loncom/interface/lontest.pm:1.17
--- loncom/interface/lontest.pm:1.16 Thu Apr 7 02:56:23 2005
+++ loncom/interface/lontest.pm Thu Apr 7 04:15:41 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# A debugging harness.
#
-# $Id: lontest.pm,v 1.16 2005/04/07 06:56:23 albertel Exp $
+# $Id: lontest.pm,v 1.17 2005/04/07 08:15:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -87,19 +87,13 @@
my $html=&Apache::lonxml::xmlbegin();
my $bodytag=&Apache::loncommon::bodytag("List Environment","admin");
$r->print($html.'<head></head>'.$bodytag);
-
+
$r->print("<hr /><h1>Debugging</h1><hr />\n");
$r->print("<font face='Courier'>");
-
- my %differences=%ENV;
- foreach my $key (sort(keys(%env))) {
- if ($env{$key} eq $differences{$key}) {
- delete($differences{$key});
- }
- }
- &print_hash($r,\%differences);
- &print_hash($r,\%env);
+ $r->print("<hr /><h2>ENV</h2><hr />\n");
&print_hash($r,\%ENV);
+ $r->print("<hr /><h2>env</h2><hr />\n");
+ &print_hash($r,\%env);
# ------------------------------------------------ If in a course, print hashes
if ($env{'request.course.id'}) {
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.620 loncom/lonnet/perl/lonnet.pm:1.621
--- loncom/lonnet/perl/lonnet.pm:1.620 Thu Apr 7 02:56:24 2005
+++ loncom/lonnet/perl/lonnet.pm Thu Apr 7 04:15:41 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.620 2005/04/07 06:56:24 albertel Exp $
+# $Id: lonnet.pm,v 1.621 2005/04/07 08:15:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -270,7 +270,6 @@
for ($envi=0;$envi<=$#profile;$envi++) {
chomp($profile[$envi]);
my ($envname,$envvalue)=split(/=/,$profile[$envi]);
- $ENV{$envname} = $envvalue;
$env{$envname} = $envvalue;
if (my ($key,$time) = ($envname =~ /^(cgi\.(\d+)_\d+\.)/)) {
if ($time < time-300) {
@@ -278,7 +277,6 @@
}
}
}
- $ENV{'user.environment'} = "$lonidsdir/$handle.id";
$env{'user.environment'} = "$lonidsdir/$handle.id";
foreach my $expired_key (keys(%Remove)) {
&delenv($expired_key);
@@ -296,7 +294,6 @@
.'</font>');
delete($newenv{$_});
} else {
- $ENV{$_}=$newenv{$_};
$env{$_}=$newenv{$_};
}
}
@@ -384,7 +381,6 @@
foreach (@oldenv) {
if ($_=~/^$delthis/) {
my ($key,undef) = split('=',$_);
- delete($ENV{$key});
delete($env{$key});
} else {
print $fh $_;