If I have a module that returns a statement handle to be used somewhere else, what is the best way to finish() and disconnect() or is it done automatically?
eg....
Module1:
my $sth = $DB->table('Foo')->select;
SQL Module:
sub select { ...code... return $sth }
When I've done what I want in Module1 can I just forget about $sth or should I have a method in the SQL module to destroy the database handle?
I heard somewhere that DBI destroys it automatically. Is that right?
eg....
Module1:
my $sth = $DB->table('Foo')->select;
SQL Module:
sub select { ...code... return $sth }
When I've done what I want in Module1 can I just forget about $sth or should I have a method in the SQL module to destroy the database handle?
I heard somewhere that DBI destroys it automatically. Is that right?