--- AnyEvent-Fork-RPC/RPC.pm 2013/04/17 19:43:48 1.6 +++ AnyEvent-Fork-RPC/RPC.pm 2013/04/17 20:24:36 1.8 @@ -4,8 +4,8 @@ =head1 SYNOPSIS - use AnyEvent::Fork; use AnyEvent::Fork::RPC; + # use AnyEvent::Fork is not needed my $rpc = AnyEvent::Fork ->new @@ -36,6 +36,9 @@ It also implements an asynchronous event mechanism from the child to the parent, that could be used for progress indications or other information. +Loading this module also always loads L, so you can make a +separate C if you wish, but you don't have to. + =head1 EXAMPLES =head2 Synchronous Backend @@ -152,7 +155,7 @@ use Guard (); use AnyEvent; -#use AnyEvent::Fork; +use AnyEvent::Fork; # we don't actually depend on it, this is for convenience our $VERSION = 0.1; @@ -256,6 +259,8 @@ =back +See the examples section earlier in this document for some actual examples. + =cut our $STRING_SERIALISER = '(sub { pack "(w/a*)*", @_ }, sub { unpack "(w/a*)*", shift })'; @@ -310,7 +315,7 @@ my $len = sysread $fh, $rbuf, $rlen - length $rbuf, length $rbuf; if ($len) { - while (5 <= length $rbuf) { + while (4 <= length $rbuf) { $len = unpack "L", $rbuf; 4 + $len <= length $rbuf or last; @@ -381,6 +386,9 @@ this case, the child process will execute all remaining RPC calls, report their results, and then exit. +See the examples section earlier in this document for some actual +examples. + =back =head1 CHILD PROCESS USAGE @@ -398,6 +406,9 @@ child process to the parent, except that there is no notion of return values. +See the examples section earlier in this document for some actual +examples. + =back =head1 SEE ALSO