>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:

  DS> I've mumbled about it on and off. I'd like to be able to do:

  DS>    $foo = new Bar;
  DS>    print SOCKET serialze($foo);

  DS> and on the other end do:

  DS>    $foo = unserialize(<SOCKET>);
  DS>    $foo->bar();

  DS> I don't know that much has been made of it yet.

well, Data::Dumper/eval does this kinda and the new Denter (from the
creator of InLine) does it too and probably better. the biggest problem
is marking the boundaries of multiple serialized thingies on the pipe
and doing the proper i/o and buffering that entails. i have done the
same stuff for stem and it is not difficult but not trivial either. i
think it would be best to support a decent (un)serializer in a standard
module and let another module handle the i/o and buffering stuff. then
you can use them in different ways such as saving the serialized data in
a DB or a file instead of only sending over a socket.

also dealing with sending object thingies over a socket is a perfect
thing to do with an event loop. just had to bring that up again. :)

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html

Reply via email to