develooper Front page | perl.perl5.porters | Postings from November 1999

Re: Need a module name... Transaction support for Storable file objects

Thread Previous
From:
Raphael Manfredi
Date:
November 15, 1999 07:20
Subject:
Re: Need a module name... Transaction support for Storable file objects
Message ID:
6420.942679207@lod23.gnb.st.com
Quoting muir@idiom.com:
:    2. 	Common interfaces to all the marshalling code.   In MLDBM,
:	there is custom interface glue for each of the published 
:	marshalling modules.  The interface glue provides a common
:	interface of 'serialize' and 'deserialize'.
:
:	This interface glue varies in complexity.
:
:	I would like to propose that all of the marhsalling modules 
:	export a common set of identical interfaces.   
:
:	This should be too hard as Raphael Manfredi has already 
:	written the glue...  It "just" needs to be moved into the various
:	modules.

To be sure I understand your point here, are you basically saying that
all marshalling modules (Data::Dumper, FreezeThaw, Storable, others to
come) actually conform to an abstract common serializaing interface?

That is to say, in essence, that they all declare:

	package XXX;
	@ISA = qw(Serializer ...);

where

	package Serializer;

	sub serialize { die "deferred" };
	sub deserialize { die "deferred" };

and therefore imposes heirs to actually define those primitives?

If you're saying this, then I doubt it will reasonably happen. That's why
the glue in MLDBM is there, to try offer a consistent serializing interface,
yet delegating the work to the actual serializing modules , understanding
their respective interfaces and features.

For instance, Storable supports store() and nstore() to deal with native
and network-neutral physical representation. But Data::Dumper has no need
for this, and its designer was free to superbly ignore the issue. Which he
did.

Raphael

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About