sub cgiapp_prerun { # If user has a session ID then validate it, otherwise get them one my $self = shift; my $dbh = $self->param('mydbh'); my $q = $self->query(); my $session_h = new CGI::Session("driver:MySQL", $q, {Handle => $dbh}); $self->param('up_session' => $session_h); }