Re: [Cgi-session-user] strange behavior with CGI::Application::Plugin::Session and SQLite
Brought to you by:
sherzodr
From: Mr. P. K. <pu...@ei...> - 2008-02-02 04:43:19
|
On Feb 1, 2008, at 10:39 PM, Ron Savage wrote: > On Fri, 2008-02-01 at 21:45 -0600, Mr. Puneet Kishor wrote: > > Hi Puneet > >> On Feb 1, 2008, at 9:24 PM, Ron Savage wrote: >> >>> On Fri, 2008-02-01 at 20:57 -0600, Mr. Puneet Kishor wrote: >>> >>> Hi Puneet >>> >>>> my $dbh = $self->dbh; >>> >>>> 32: my $dbh = $self->{Handle}; >>> >>> Why not use: >>> >>> my $dbh = $self -> dbh(); >>> >>> Or, does sub dbh_config() store $dbh into $self -> {Handle}? >>> >> >> I have no idea why... that line is from /usr/local/lib/perl5/ >> site_perl/ >> 5.8.8/CGI/Session/Driver/sqlite.pm which was not written by me. >> >> The "Handle" bit comes from >> >> # Configure the session >> $self->session_config( >> CGI_SESSION_OPTIONS => [ "driver:sqlite;serializer:Storable", >> $self->query, {Handle => $dbh} ], >> DEFAULT_EXPIRY => "+1w", >> COOKIE_PARAMS => { -expires => "+24h", -path => "/", }, >> SEND_COOKIE => 1, >> ); >> >> which is from the C:A:P:Session docs. I am just following the >> instructions. > > Just because you call session_config with {Handle => $dbh} does not > mean > you can later use my $dbh = $self -> {Handle}. Fix that problem first. Ron, I have absolutely no idea what I am supposed to fix. Could you kindly be more explicit/guide me in this? As I said above, I am *not* the one using my $dbh = $self -> {Handle} That is from CGI::Session::Driver::sqlite.pm which was written by I- don't-know-who None of the code above is mine except for the following line $self->session->param("~user_id", $aref_nodes); |