jerryhone has asked for the wisdom of the Perl Monks concerning the following question:
That's all fine and dandy, and I seem to get a good database connection. However, if I then try to use $ECClib::dbh in my parent script, it fails. My calling script haspackage ECClib; my $dbh; sub initialise(){ . . $dbh = db_connect($dbuser, $dbpasswd, $dbserver); . . )
The statement handle assignment fails - debugging shows that $ECClib::dbh is undefined. What am I doing wrong?use ECClib; ECClib::initialise(); my $sql="select InputID from ECCInput order by InputID"; my $sth = $ECClib::dbh->prepare($sql);
|
|---|