Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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


Comment on Re^2: Value for session set in CGI::Session is undef
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://756156]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (15)
As of 2015-07-07 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls