in reply to DBM::Deep Can't store something that is tied

Don't try to put anything into a DBM::Deep stucture that is tied, cos it won't work. The reason is that DBM::Deep uses tied structures itself, and you can only tie() to one class at a time in perl.
  • Comment on Re: DBM::Deep Can't store something that is tied

Replies are listed 'Best First'.
Re^2: DBM::Deep Can't store something that is tied
by funduraghu (Initiate) on Sep 06, 2007 at 10:19 UTC
    I'm just trying to modify an array list (tied to DBM::Deep itself) and delete one of the entries.

    I also tried doing the following thing:
    $db->delete(1111); splice(splice(@{$bucketobj->{referrerindex}}, 1, 1); $db->{1111} = $bucketobj; # Modified object
    Even this doesn't work
Re^2: DBM::Deep Can't store something that is tied
by dragonchild (Archbishop) on Sep 11, 2007 at 01:35 UTC
    While technically true, this can be worked around quite easily in most cases. But, since my brain hasn't wanted to work through all the possibilities, I have taken the safe route and disallowed it in all cases. The biggest problem is things that are tied to external resources, like DBI.

    One of these days I'll add a facade that allows for storing tied things.


    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?