in reply to Re^2: dbh->disconnect or leave to scope
in thread dbh->disconnect or leave to scope

Only if $dbh is scoped to the sub. If $dbh is scoped to the file or the module, it is not disconnecting at the return from the sub.

Personally I never disconnect, which has several reasons:

Personally, I think scoped cleanup is the neatest way to manage database resources, but YMMV. The local DBA certainly should have a word in the matter.

FWIW I manage two DBD's on CPAN and am co-maint of DBI.


Enjoy, Have FUN! H.Merijn