Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Using Data::Dumper on a MySQL statement handle

by kcott (Archbishop)
on Nov 10, 2010 at 17:41 UTC ( [id://870634]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Using Data::Dumper on a MySQL statement handle
in thread Using Data::Dumper on a MySQL statement handle

This sounds like a follow-up to Perl DBI: Overloading statement handle. If so, can you post the code that you finally came up with. Actually, even if it's something completely different, still post the code.

Also, can you run print Dumper($dbh);, and post that output too.

-- Ken

Replies are listed 'Best First'.
Re^4: Using Data::Dumper on a MySQL statement handle
by sherab (Scribe) on Nov 10, 2010 at 19:39 UTC
    I did have a similar problem that was very much like this. Using Dumper against $sth/$dbh is normally futile because the data is hidden behind a tie(). In cases of subclassing Perl's DBI, you'll laugh, you'll cry, and you may want to consider callbacks instead.
    http://search.cpan.org/~timb/DBI/DBI.pm#Callbacks
    Ken, I'll go back to the Perl DBI question I had previously and post what worked for me.
Re^4: Using Data::Dumper on a MySQL statement handle
by Anonymous Monk on Nov 10, 2010 at 18:07 UTC
    Thanks for that link. print Dumper($dbh) has almost the same result.
    $VAR1 = bless( {}, 'DBConnect::db' );
    I am starting to think that Dumper just won't work on DBI.

      I would say it's working perfectly fine. I can achieve the same output with that code:

      $ perl -wE 'use Data::Dumper; my $dbh = bless {} => q{DBConnect::db}; +print Dumper($dbh);' $VAR1 = bless( {}, 'DBConnect::db' );

      But, the real question is: What's your code doing?

      -- Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://870634]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-23 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found