When the CHI handle is destroyed, its dbh will be destroyed as well. You could try keeping a global reference to $cache->dbh somewhere, that might prevent it from being destroyed:
$global_dbh = $cache->dbh
On Jun 13, 2015, at 5:26 AM, Nigel Horne via RT <bug-CHI-Driver-BerkeleyDB@rt.cpan.org> wrote:
Show quoted text> Sat Jun 13 08:26:26 2015: Request 105207 was acted upon.
> Transaction: Ticket created by NHORNE
> Queue: CHI-Driver-BerkeleyDB
> Subject: Driver Close
> Broken in: 0.02
> Severity: Important
> Owner: Nobody
> Requestors: NHORNE@cpan.org
> Status: new
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=105207 >
>
>
> When does the driver close the database? I have a destructor called by END not DESTROY which fails because the database is "already closed". How do I force CHI to be closed/unloaded afterwards?