2001-02-20 09:54:34 +01:00
|
|
|
The Storable extension brings persistency to your data.
|
|
|
|
|
2002-06-10 04:40:06 +02:00
|
|
|
You may recursively store to disk any data structure, no matter
|
|
|
|
how complex and circular it is, provided it contains only SCALAR,
|
|
|
|
ARRAY, HASH (possibly tied) and references (possibly blessed) to
|
|
|
|
those items.
|
2001-02-20 09:54:34 +01:00
|
|
|
|
|
|
|
At a later stage, or in another program, you may retrieve data from
|
2002-06-10 04:40:06 +02:00
|
|
|
the stored file and recreate the same hiearchy in memory. If you
|
|
|
|
had blessed references, the retrieved references are blessed into
|
|
|
|
the same package, so you must make sure you have access to the same
|
|
|
|
perl class as the one used to create the relevant objects.
|
2001-02-20 09:54:34 +01:00
|
|
|
|
2002-06-10 04:40:06 +02:00
|
|
|
There is also a dclone() routine which performs an optimized
|
|
|
|
mirroring of any data structure, preserving its topology.
|
2001-02-20 09:54:34 +01:00
|
|
|
|
|
|
|
Objects (blessed references) may also redefine the way storage and
|
|
|
|
retrieval is performed, and/or what deep cloning should do on those
|
|
|
|
objects.
|