in reply to Qualified package variable access
When I do this sort of thing, I return the dbh back to the caller, as follows:
andpackage ECClib; my $dbh; sub initialise(){ . . $dbh = db_connect($dbuser, $dbpasswd, $dbserver); . . return $dbh )
use ECClib; my $dbh = ECClib::initialise(); my $sql="select InputID from ECCInput order by InputID"; my $sth = $dbh->prepare($sql);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Qualified package variable access
by tobyink (Canon) on Dec 17, 2020 at 22:03 UTC |