in reply to Re^2: How to share DBI connections between objects?
in thread How to share DBI connections between objects?
I'm not sure I understand. I presume you're objecting to My->Db, right?
So instead something more like this?
package My::Underling; our $Db; sub import { my($class, $config_ref )=@_; $Db = DBI->connect( @{$config_ref->{connect_args} } ); } # ... else where in the code import My::Underling \%global_config;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to share DBI connections between objects?
by adrianh (Chancellor) on Mar 27, 2007 at 12:38 UTC | |
by f00li5h (Chaplain) on Mar 28, 2007 at 00:21 UTC |