Generic module that allows objects to be safely stored/retrieved from disk. Can be inhereted by any BioPerl object. As it will not usually be the first class in the inheretence list, _initialise_storable() should be called during object instantiation.

Object storage is recursive; If the object being stored contains other storable objects, these will be stored separately, and replaced by a skeleton object in the parent heirarchy. When the parent is later retrieved, its children remain in the skeleton state until explicitly retrieved by the parent. This lazy-retrieve approach has obvious memory efficiency benefits for certain applications.

By default, objects are stored in binary format (using the Perl Storable module). Earlier versions of Perl5 do not include Storable as a core module. If this is the case, ASCII object storage (using the Perl Data::Dumper module) is used instead.

ASCII storage can be enabled by default by setting the value of $Bio::Root::Storable::BINARY to false.

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.

rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

Arg [1] : Same as for 'new'
Function : Similar to store, except returns a 'skeleton' of the calling
object, rather than the statefile.
The skeleton can be repopulated by calling 'retrieve'. This
will be a clone of the original object.
Returntype: Bio::Root::Storable inhereting object
Exceptions:
Caller :
Example : my $skel = $obj->new_retrievable(); # skeleton
$skel->retrieve(); # clone

Arg [1] : none
Function : Prepares the the serialised representation of the object.
Object attribute names starting with '__' are skipped.
This is useful for those that do not serialise too well
(e.g. filehandles).
Attributes are examined for other storable objects. If these
are found they are serialised separately using 'new_retrievable'
Returntype: string
Exceptions:
Caller :
Example : my $serialised = $obj->serialise();

Arg [1] : string; filesystem location of the state file to be retrieved
Function : Retrieves a stored object from disk.
Note that the retrieved object will be blessed into its original
class, and not the
Returntype: Bio::Root::Storable inhereting object
Exceptions:
Caller :
Example : my $obj = Bio::Root::Storable->retrieve( $token );

Arg [1] : variable
Function : Converts whatever is in the the arg into a string.
Uses either Storable::freeze or Data::Dumper::Dump
depending on the value of $Bio::Root::BINARY
Returntype:
Exceptions:
Caller :
Example :

Arg [1] : string
Function : Converts the string into a perl 'whatever'.
Uses either Storable::thaw or eval depending on the
value of $Bio::Root::BINARY.
Note; the string arg should have been created with
the _freeze method, or strange things may occur!
Returntype: variable
Exceptions:
Caller :
Example :