in reply to Re^5: DBM::Deep Problem
in thread DBM::Deep Problem

Be careful not to mix apples and oranges here. MLDBM uses one strategy. DBM::Deep uses a different strategy that does indeed work to track changes to deep structures. However, there is a bug with autoviv: it doesn't call the STORE routine of the tied hash when a value is autovivied for a deeper reference.

If you carefully extend your DBM::Deep hash, it works as advertised, and in a way that MLDBM cannot touch, and in a way that requires no binary DBM module. This is a remarkable achievement. The horsing around required by MLDBM referenced in Re^3: DBM::Deep Problem is not required in DBM::Deep.... you just have to not autovivify.

The tie bug is sad. I wish it would get fixed.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^7: DBM::Deep Problem
by holli (Abbot) on May 18, 2005 at 12:34 UTC
    The tie bug is sad. I wish it would get fixed.
    So write a patch :-)


    holli, /regexed monk/
Re^7: DBM::Deep Problem
by demerphq (Chancellor) on May 18, 2005 at 12:39 UTC

    Well, i guess i read the comments in MLDBM as including the problem of autovivification on ties. It says

    This limitation exists because the perl TIEHASH interface currently ha +s no support for multidimensional ties.

    which i guess isnt exactly the same thing, but its pretty close.

    ---
    $world=~s/war/peace/g

        Good plan. Test cases are always helpful.

        ---
        $world=~s/war/peace/g