SPUG: Tied Hashes: Works with Nested Hashes?

Andrew Sweger andy at n2h2.com
Thu Feb 3 21:36:49 CST 2000


On Feb 3, 2000 @ 6:51pm, Tim Maher/CONSULTIX wrote:

> For the first time, I'm trying to "tie" a non-trivial hash  (one with
> values that are references to other "nested" hashes), and having trouble.
> 
> I don't see any statement anywhere that you can only tie simple hashes,
> but now I'm wondering if that's the limitation.
> 
> What's the scoop?

The referencishness of the values in the top hash is lost when saved to
the tied hash (or else what would they refer to?). Serialize the structure
with Freeze/Thaw or whatever. Sorry, I don't remember what it is off
hand...

-- 
  Andrew Sweger <andy at n2h2.com>  |  N2H2, Incorporated
  v=206.336.2947 f=206.336.1541  |  900 Fourth Avenue, Suite 3400
     Advanced Technologies       |  Seattle WA 98164-1059
          Development            |  http://www.n2h2.com/


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list