RE: embedding DB handle in object (was RE: adding key to DB objec t)
From: Brandon Metcalf (bmetcalf_at_nortel.com)
Date: 03/30/05
- Next message: Colleen: "DBI disconnect slow performance"
- Previous message: Ronald J Kimball: "RE: adding key to DB object"
- In reply to: Will Rutherdale: "RE: embedding DB handle in object (was RE: adding key to DB objec t)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Mar 2005 17:37:22 -0600 (CST) To: "Rutherdale, Will" <Will.Rutherdale@sciatl.com>
W == Will.Rutherdale@sciatl.com writes:
W> my $dbh = DBI->connect( .... );
W> my $big_honkin_data_structure = { house => "semi", car => "oldsmobile",
W> dbh
W> => $dbh,
W> age => 43, ... };
W> ...
W> myFavouriteSubroutine( $big_honkin_data_structure->{dbh}, 3 );
W> ...
W> sub myFavouriteSubroutine
W> {
W> my ( $dbh, $num ) = @_;
W> my $data = $dbh->selectall_arrayref( .... );
W> ....
W> }
This is pretty much what I'm doing. Tim provided the solution which
was to remove DBI::db from @ISA.
-- Brandon
- Next message: Colleen: "DBI disconnect slow performance"
- Previous message: Ronald J Kimball: "RE: adding key to DB object"
- In reply to: Will Rutherdale: "RE: embedding DB handle in object (was RE: adding key to DB objec t)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|