[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Tue, 24 Feb 2004 16:26:07 -0000
matthew Tue Feb 24 11:26:07 2004 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
&delenv: Remove keys from the environment when deleted.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.472 loncom/lonnet/perl/lonnet.pm:1.473
--- loncom/lonnet/perl/lonnet.pm:1.472 Tue Feb 10 19:10:01 2004
+++ loncom/lonnet/perl/lonnet.pm Tue Feb 24 11:26:06 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.472 2004/02/11 00:10:01 albertel Exp $
+# $Id: lonnet.pm,v 1.473 2004/02/24 16:26:06 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -377,7 +377,12 @@
return 'error: '.$!;
}
foreach (@oldenv) {
- unless ($_=~/^$delthis/) { print $fh $_; }
+ if ($_=~/^$delthis/) {
+ my ($key,undef) = split('=',$_);
+ delete($ENV{$key});
+ } else {
+ print $fh $_;
+ }
}
close($fh);
}