Subject: | CGI::Session::Driver::DBI::DESTROY throws a warning when DBI is destroyed before session object |
I noticed this in my error logs when using CGI::Session in
CGI::Application. When I've passed a DBI object to CGI::Session via
CGI::Application::Plugin::Session and the request is ending, the DBI
object is being destroyed before the Session.
CGI::Session::Driver::DBI::DESTROY does a "ping" on the DBH so it can do
a $self->set_error() stating that the handle was destroyed. However,
because the handle is already gone the ->ping produces a "Can't call
method ping on undefined value". If you change the if statement to
include a check if $self->{Handle} is defined as well as if ->ping
works, no more warning.
Not a big deal, but it's cluttering my logs. :)
Patch enclosed.
Thanks for your time and a great module.
Subject: | CGI-Session-Driver-DBI_DESTROY-patch |
Message body not shown because it is not plain text.