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

Re^3: Implement Object Persistence (II)

by dragonchild (Archbishop)
on Apr 29, 2005 at 13:28 UTC ( [id://452686]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Implement Object Persistence (II)
in thread Implement Object Persistence (II)

It's, at the very least a doc bug, in that the POD doesn't have this limitation in the CAVEATS. I originally thought it was an implementation bug, but the author responded and said it wasn't.

So sorry, but DBM::Deep doesn't handle objects (i.e. blessed hashes). It only supports anonymous hashes and arrays. Anything blessed will not be stored blessed. I considered adding this feature, but many classes don't appreciate having their hashes tied. Its on my to-do list for a future release, however.

I think it can be done, but that requires maintaining a separate metadata structure which may require a complete redesign of the file layout.


The Perfect is the Enemy of the Good.

  • Comment on Re^3: Implement Object Persistence (II)

Replies are listed 'Best First'.
Re^4: Implement Object Persistence (II)
by merlyn (Sage) on Apr 29, 2005 at 13:34 UTC
    Well, I read the very same docs you did (I presume), and I never got the impression that it would store objects. Interesting how we saw two entirely different things in the docs.

    And frankly, I wouldn't want it to store objects. The design is clean... adding blessings alongside would clutter up the protocols needed to access the existing metadata. If you send it an "export" call, should it be DBM::Deep's export, or the native object export? That's the kind of confusion you'd get by permitting objects in the mix.

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

      As usually, you're absolutely right. The docs should still be explicit about the fact that this will not store objects. :-)

      The Perfect is the Enemy of the Good.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://452686]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.