Re: [Cgi-session-user] Trouble with C::S::SQLite
Brought to you by:
sherzodr
From: Mark S. <ma...@su...> - 2006-03-07 14:29:34
|
On Tue, Mar 07, 2006 at 07:45:57AM -0600, Puneet Kishor wrote: > well, if I change > > new CGI::Session("driver:sqlite", $sid, {Handle=>$DBH}) > > to either of the following two choices > > new CGI::Session("driver:sqlite", $sid, > {Handle=>DBI->connect("dbi:SQLite:dbname=/path/to/my.db")}) > new CGI::Session("driver:sqlite", $sid, > {DataSource=>"dbi:SQLite:dbname=/path/to/my.db"}) > > The session value gets stored in the database alright, but I get the > following error > > >> (in cleanup) Can't call method "commit" on unblessed reference at > > /usr/local/ActivePerl-5.8/lib/site_perl/5.8.7/CGI/Session/Driver/DBI.pm > line 128 > during global destruction. Does it still happen if you call $ses->flush(); before the script exits? This sounds like a different, known issue with our use of DESTROY: http://rt.cpan.org/Public/Bug/Display.html?id=17541 My most recent thinking on this is that we should add a "auto_flush" option, which would currently default to false. It would prevent the activity at DESTORY time, with people making explicit calls to flush() instead. We'd have a big warning in the ChangeLog that people need to change the call to new() if they want to preserve the old behavior. Thoughts on this? Sherzod? It seems like the auto-flushing code continues to cause problems and should really not be recommended or turned on by default. Mark |