in reply to Using objects in exported functions
Pass it as an argument to the function.
print "info: " , getdb( $dbh ) , "\n"; sub getdb { my $dbh = shift; my $query = $dbh->selectrow_hashref("SELECT something FROM a_table +"); return $query->{'explanation'}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using objects in exported functions
by Anonymous Monk on May 31, 2004 at 04:49 UTC | |
by chromatic (Archbishop) on May 31, 2004 at 05:47 UTC | |
by tkil (Monk) on May 31, 2004 at 06:00 UTC |