knell has asked for the wisdom of the Perl Monks concerning the following question:
When a user simply looks at FAQ, or login page, or help page the cgiapp creates a session, but I do not need it. Usually I do something like this in other projects:unless ($self->session->param('user_id')) { $self->prerun_mode('login'); }
In this case I create session only after loginmy $s = CGI::Session->load("driver:mysql", undef, { DataSource => "dbi:mysql:$DB_Name", User => $DB_User, Password => $DB_Pass }); $app->redirect() if ($s->is_empty);
Is it possible to work with CGI::Application::Plugin::Session such as CGI::Session method load()?$s = $s->new; $s->param('user_id', $user->id);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Session->load and CGI::Application
by Herkum (Parson) on May 22, 2008 at 22:58 UTC | |
by knell (Initiate) on Jun 10, 2008 at 12:52 UTC |