Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Value for session set in CGI::Session is undef

by bradcathey (Prior)
on Apr 07, 2009 at 21:32 UTC ( #756156=note: print w/replies, xml ) Need Help??


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.

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://756156]
help
Chatterbox?
[marto]: hey Corion, good weekend?
[Corion]: marto: Yeah, even though I didn't write any code :)
[Corion]: But at least I have a plan of action to move the site to https, played some (free!) VR games with friends and watched the plans for the next German Perl workshop progress ;)
[Corion]: AltSpace VR is amazingly good - highly polished and with some of the games you get for free what you'd pay EUR 20 or EUR 40 otherwise
[Corion]: But maybe it's also due to that I play with friends, which makes a game more enjoyable anyway ;)
[Corion]: Oh - I released a new version of some module, thanks to a pull request. But I don't consider "update Makefile.PL" and "update author tests" as "writing code" ;-D

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2017-08-21 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (319 votes). Check out past polls.

    Notices?