By taking a reference to $DB in ref_to_db you're introducing an unneeded extra layer of indirection. A DBI handle is already a reference; just return $DB and everything will work. For completeness sake, ${ $Booga }->disconnect (or more succinctly ${ $_[0] }->disconnect) would dereference the extra layer of indirection then call the disconnect method on the resulting handle.
In reply to Re: pass reference, to a hash with a reference to an open db handle, to a sub - help
by Fletch
in thread pass reference, to a hash with a reference to an open db handle, to a sub - help
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |