gwhite has asked for the wisdom of the Perl Monks concerning the following question:
I am self taught so sometimes I just don't get what the doc is saying if it gets over my head. I am trying to use CGI::Session, I have an 8 page input form, but during the loading of form page 5 I need several of the variables from previous pages to determine what questions should be shown, and at the end I need everything pulled in to process. I would like to use something along the lines of the CGI command param(), where I can on one line just load a hash with all the values stored in the session. Is that possible? Here is how I use CGI:
All the examples in CGI::Session::Tutorial load a specific value, no examples just slurping in everything. So with CGI::Session I have tried to do a load_param() like this and it doesn't seem to take.my $input = new CGI(); my %hash = map { $_, $input->param($_) } $input->param();
What do I need to get all my session variables loaded into a hash?$session = CGI::Session->load() or die CGI::Session->errstr; $input = $session->load_param(); # $input is my existing cgi object my %hash = map { $_, $input->param($_) } $input->param();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI::Session reloading
by moritz (Cardinal) on Oct 20, 2008 at 13:04 UTC | |
by gwhite (Friar) on Oct 20, 2008 at 14:07 UTC |