in reply to Re: DBI & setsockopt
in thread DBI & setsockopt

I believe the sock in this context is actually the port number specified in the connect() call, and not the socket used to communicate. Even while trying to debug, I must be doing something stupid. Here's what I'm doing:
$dbh = &db_connect; print "hi there 3\n"; #my $p = $dbh->sock; #my $h = $dbh->host; #my $d = $dbh->database; #print "port: p\nhost: $h\ndb : $d\n"; print "dbh: $dbh\n"; use Data::Dumper; Data::Dumper->Dump([$dbh]); foreach ( keys %$dbh) { print "$_=$dbh{$_}\n"; } print "got here\n";
And here's what I get:
hi there 3 dbh: DBI::db=HASH(0x3de72b0) got here
a) Its telling me that $dbh is a hash, but why can't I print out its contents?

b)The 4 lines are commented out, because if I leave them in, the application dies silently.

Replies are listed 'Best First'.
Re^3: DBI & setsockopt
by derby (Abbot) on Nov 23, 2005 at 15:17 UTC

    Sorry for the confusion, I was talking about the Mysql module not the DBD::Mysql module (they're slightly different).

    -derby