another way of freezing individual objects

[prev] [thread] [next] [lurker] [Date index for 2004/06/25]

From: Steve Purkis
Subject: another way of freezing individual objects
Date: 13:13 on 25 Jun 2004
--Apple-Mail-18-336749734
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Hi list,

James and I were talking about a different way of freezing individual 
objects that we might be able to use in Pixie.  It's based on 
Data::Structure::Util's get_blessed(), and Storable's dclone() 
(Clone::clone would be faster, but as we've just seen, it breaks when 
it comes across Magic Perl internals don't know how to handle).

The general idea is to avoid using Data::Dumper which costs a lot doing 
dump & eval, and to replace it with something more easy to understand 
at first-glance.  (I initially thought freezing objects was a simple 
task -- boy was I surprised!)

See the example attached... though I cobbled this one together, most 
credit goes to James for coming up with the first prototype.

-Steve

--Apple-Mail-18-336749734
Content-Transfer-Encoding: base64
Content-Type: application/x-gzip;
	x-unix-mode=0644;
	name="Pixie-freezer.tar.gz"
Content-Disposition: attachment;
	filename=Pixie-freezer.tar.gz

H4sIAAAAAAAAA+1Ye28aRxDPv+ZTjBxHvpOAHuZVgUzTPCpZqhIrlqtKrnVajsVcfdxd944Q4/Dd
OzO7B3c2mLglbtOyUoKZmZ2Z3Xn9llP/ky8rQyXlTKrvnn2V5TgNp91s4qfjtFvFT7Oe1Ryn1XZq
tUa79syp1Zv4Ac2v405xTZJUKIBnSTxR136yVm4T/xtdp4X4B37/K+TAY+LfbLUw/o16o7GL/1Os
+/Fnylaz4HH138D4NxtHzi7+T7HWxf99/3fppdV4vAUbDgUXC3pd/Jv4N4m0avWjRo36f7vWwv7v
bMH2xvU/j38svGtxJYGj3unosHdLpUkiIUmVT1/o79dCxfDH1AIvCocyScBTkbgGG0WjiYKDX95+
ODt5/w6OYf+o6nzvOkf7yEomfQjlFG5LAOMbOPACgVuPIRn5Q1SsiYkMhoBE6Aek+HZeNoIkwNxK
zw/91IKXLhkEUDKdqFDzuqW5tkMicAsH7oVz2QVDxH+sylUyiaMw8ft+4Kc3C4fYds4fPpUFlieC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