--- loncom/cgi/loncgi.pm 2003/10/09 22:04:37 1.1 +++ loncom/cgi/loncgi.pm 2005/04/05 20:43:27 1.2 @@ -1,7 +1,7 @@ # # LON-CAPA helpers for cgi-bin scripts # -# $Id: loncgi.pm,v 1.1 2003/10/09 22:04:37 matthew Exp $ +# $Id: loncgi.pm,v 1.2 2005/04/05 20:43:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -52,10 +52,16 @@ package LONCAPA::loncgi; use strict; use warnings FATAL=>'all'; no warnings 'uninitialized'; +use vars qw(%env); + use CGI(); use CGI::Cookie(); use Fcntl qw(:flock); use LONCAPA::Configuration(); +require Exporter; + +our @ISA = qw (Exporter); +our @EXPORT = qw(%env); my $lonidsdir; @@ -151,8 +157,10 @@ sub transfer_profile_to_env { chomp($envrow); my ($envname,$envvalue)=split(/=/,$envrow); $ENV{$envname} = $envvalue; + $env{$envname} = $envvalue; } $ENV{'user.environment'} = "$lonidsdir/$handle.id"; + $env{'user.environment'} = "$lonidsdir/$handle.id"; return undef; }