Why can't I disable my database descriptors using DBD :: DB2?
My perl script is slow but works. I am considering tossing it out and creating a true DB2 application with proper bindings, etc .; however, in the meantime, I want it to work as a site owner.
I went through this documentation and it mentions:
$dbh->disconnect();
However, I cannot use it because it is throwing this error.
Unable to find object method "disable" via package "dbh" (maybe download "dbh"?) In. /ProgramTree.pl, line 119.
I know my temporary app is leaking and growing because it recursively opens database handles. Am I missing something fundamental?
a source to share
This error sounds very terrible as the sigil is missing and you only use dbh->disconnect();
.
See what happens when the object has no method:
[~] perl -e'my $ dbh = bless {}, q / foo /; $ dbh-> disconnect (); '
Can't locate object method "disconnect" via package "foo" at -e line 1.
Compared to when you call this method in the bare word "dbh":
[~] perl -e'dbh-> disconnect (); '
Can't locate object method "disconnect" via package "dbh" (perhaps you forgot to load "dbh"?) At -e line 1.
a source to share