in reply to Re^2: MLDMB Problem
in thread MLDBM Problem

OK I tried to just read it with DB_File as you suggested, and it worked.

The code:

use strict; use MLDBM qw(DB_File); my $db = 'data_db'; my %records; my $dbh = tie %records, 'MLDBM', $db or die $!; my $junk = 1;
Something else interesting: If I set a breakpoint on the last line and run it straight to there, I get the error about Dumper.pm. If I step through the tie statement with the debugger, I don't get the error. WTF? In that case the debugger lists type = exception for both $dbh and %records.

Replies are listed 'Best First'.
Re^4: MLDMB Problem
by graff (Chancellor) on Aug 09, 2008 at 17:21 UTC
    I wasn't able to replicate your results. I ran the snippet provided on the MLDBM man page, adding "qw(DB_File)" as needed, and used the resulting hash file as input for your snippet -- no errors. When I added "use Data::Dumper" and "print Dumper(...)" (as in the man page code), the output was as expected.

    Maybe you should check that your MLDBM and Data::Dumper modules are both up-to-date?

      Yeah I will try that, and it that doesn't work I'll just extract the data I need with DB_File. Thanks for your help.