in reply to Re: Value for session set in CGI::Session is undef
in thread Value for session set in CGI::Session is undef
Every poster was correct pointing out that $session was not defined in my calling program. Duh!
So, I tried this first:
my $logged_in = write_session( $user ); my $session = CGI::Session->load(); print Dumper($logged_in, $session->param('user'));
which I thought would be the proper way to do it, but ended up following your advice with:
my $session = new CGI::Session(); my $logged_in = write_session( $session, $user ); print Dumper($logged_in, $session->param('user'));
which did the trick. Thanks.
|
|---|