Circular References

[prev] [thread] [next] [lurker] [Date index for 2003/10/10]

From: Mark Fowler
Subject: Circular References
Date: 17:29 on 10 Oct 2003
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@xxxxxxxxx.xxx.xxxxxxxxxx.xxx for more info.

--1388560483-585567429-1065803376=:1602
Content-Type: TEXT/PLAIN; charset=US-ASCII

I've had a real mare recently trying to get pixie to store things with
circular references in it.  Things would apparently store okay, but when I
pulled them out of the database one of the links would be undef.

I've been doing a lot of testing on this and have worked out that I think
it only happens when you're inserting a self refering data structure as
the root node.  I suspect that's because the Dumper doesn't dtrt.

Example tests attached.

In the end I've rewritten on of my accessor methods to store the
$self->PIXIE::oid of the object it's passed on a set, and do a get($oid)
on a get.  Which isn't very transparent.

Mark.

-- 
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, mark@xxxxxxxxxxxxxx.xxx, http://twoshortplanks.com/};
--1388560483-585567429-1065803376=:1602
Content-Type: APPLICATION/octet-stream; name="pixie_test.tar.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.55.0310101729361.1602@xxx.xxxxxxxxxxxxxx.xxx>
Content-Description: 
Content-Disposition: attachment; filename="pixie_test.tar.gz"

H4sICO03hD8AA3BpeGllX3Rlc3QudGFyAO1YXWvbMBTNs3/FXbuHBJpG/gaH
hDK2scIGHd3DYIzUjtXaxLGMLdOG0P8+Sf6I2yz11jkpZTovTq6kI91cnXtv
nIR3IZ5RnNFs1NsTEDI02zTZE6m2iZrPCj1k24aKdN3W1B5SNWRbPTD3daAm
8oy6KUBv6aaLp+a1jb9SJI34fyTkNFl2vwdSEbIMY2f8NRbsMv7IsNg9UXXV
UnuAuj/KNv73+LvzhXuDgcV+rChZ7kGMb5W1ArBcwdt55GYZTCALwms6Lo00
CLnNizAbW9+flNP4cIppnsbFlLFyXxDOgzDya8pydc0oDMPpWsy6r0YgvIaz
2WPKeprgVsfKS/96rx9N/b9z0x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