in reply to Perl dbi disconnect question...
The database will automatically disconnect when the script ends or when the "dbh"-handle goes out of scope (I notice that you did not do a my $dbh).
But if you are using mod-perl, if the script reaches its end, it does not get destroyed and the database connection remains open as exit() does not work under mod-perl.
And if you are pooling your database connections under mod-perl with Apache::DBI disconnect is a no-op anyway.
As disconnect might do some cleaning up (such as rollback, ...) depending on the type of database you are using, I think it is better to do this clean-up explicitly yourself and not rely on what disconnect might or might not do under the hood itself.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|