Subject: | CGI::Session::Driver::DBI::DESTROY throws a warning when DBI is destroyed before session object |
MIME-Version: | 1.0 |
X-Mailer: | MIME-tools 5.418 (Entity 5.418) |
Charset: | utf8 |
X-RT-Original-Encoding: | utf-8 |
Content-Type: | multipart/mixed; boundary="----------=_1210911684-19854-2" |
Content-Length: | 0 |
Content-Type: | text/plain |
Content-Disposition: | inline |
Content-Transfer-Encoding: | binary |
Content-Length: | 722 |
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 |
MIME-Version: | 1.0 |
Content-Type: | multipart/mixed; boundary="----------=_1210911684-19854-1" |
X-Mailer: | MIME-tools 5.418 (Entity 5.418) |
Charset: | utf8 |
Content-Length: | 0 |
Content-Type: | text/plain |
Content-Disposition: | inline |
Content-Transfer-Encoding: | binary |
X-RT-Original-Encoding: | iso-8859-1 |
Content-Length: | 0 |
Content-Type: | application/octet-stream; name="CGI-Session-Driver-DBI_DESTROY-patch" |
Content-Disposition: | inline; filename="CGI-Session-Driver-DBI_DESTROY-patch" |
Content-Transfer-Encoding: | base64 |
Content-Length: | 479 |
Message body not shown because it is not plain text.