Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: dbh->disconnect or leave to scopeby Tux (Canon) |
on Jan 19, 2011 at 07:57 UTC ( [id://883065]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|