in reply to CGI::App session params losing values between redirects

Update: solved

After another very careful reading of the docs and looking at the source code of the plugin, I added the line CGI::Session->name('MY_SESSID'); and voila. Turns out if you change the name of the cookie in your configuration block, you have to let CGI::Session know about it or it creates another cookie/session, wiping out the old one. As soon as I added the line, all was good. I'm curious where it stores the name, because I'm not finding it in the actual /tmp/sessionfile.

package Super; use warnings; use strict; use base 'CGI::Application'; use CGI::Application::Plugin::Redirect; use CGI::Application::Plugin::Session; (my $http_host = $ENV{'HTTP_HOST'}) =~ s/(www.)([a-zA-Z0-9\-\.]+)/$2/ +; $self->session_config( COOKIE_PARAMS => { -name => 'MY_SESSID', -expires => '+8h', -path => '/', -domain => ".".$http_host, }, SEND_COOKIE => 1, ); CGI::Session->name('MY_SESSID'); #Added this line

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