in reply to DBI handle_error debugging

This is guesswork, because I couldn't find much documentation on db ...

But it seems to be provided by the DBD (database driver) for the SQL server you use.

Those are normally implemented in XS resp. C, and their data structures can be magic.

Much like a Tie::Hash where FETCH is provided but not FIRSTKEY and NEXTKEY.

Consequently without inspection of the keys, one can't dump it.

For that one needs to know beforehand, which keys are accepted by FETCH.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

update

To avoid confusion, this says that you are dealing with an object not a simple hash. To be precise a hash blessed into the package DBI::db. The rest holds.

1 DBI::db=HASH(0x33c6af0) empty hash

But you might want to check it again with Data::Dumper to rule out problems with the debuggers internal dumper.

Replies are listed 'Best First'.
Re^2: DBI handle_error debugging (updated)
by Anonymous Monk on Jan 31, 2024 at 08:20 UTC
    Is there a way to display the contents of the object (DBI::db=HASH(0x33c6af0)) under the debugger when I don't have a handle to it?
      You can loop over the keys/attributes you know to exist.

      First step would be to find the documentation of DBI::db...

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery