ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-Fork-RPC/RPC.pm
(Generate patch)

Comparing AnyEvent-Fork-RPC/RPC.pm (file contents):
Revision 1.32 by root, Sat Aug 31 19:51:25 2013 UTC vs.
Revision 1.33 by root, Tue Oct 15 09:15:59 2013 UTC

391use Errno (); 391use Errno ();
392use Guard (); 392use Guard ();
393 393
394use AnyEvent; 394use AnyEvent;
395 395
396our $VERSION = 1.2; 396our $VERSION = 1.21;
397 397
398=item my $rpc = AnyEvent::Fork::RPC::run $fork, $function, [key => value...] 398=item my $rpc = AnyEvent::Fork::RPC::run $fork, $function, [key => value...]
399 399
400The traditional way to call it. But it is way cooler to call it in the 400The traditional way to call it. But it is way cooler to call it in the
401following way: 401following way:
629 }; 629 };
630 630
631 my $module = "AnyEvent::Fork::RPC::" . ($arg{async} ? "Async" : "Sync"); 631 my $module = "AnyEvent::Fork::RPC::" . ($arg{async} ? "Async" : "Sync");
632 632
633 $self->require ($module) 633 $self->require ($module)
634 ->send_arg ($function, $arg{init}, $serialiser, $arg{done} || "CORE::exit") 634 ->send_arg ($function, $arg{init}, $serialiser, $arg{done} || "$module\::do_exit")
635 ->run ("$module\::run", sub { 635 ->run ("$module\::run", sub {
636 $fh = shift; 636 $fh = shift;
637 637
638 my ($id, $len); 638 my ($id, $len);
639 $rw = AE::io $fh, 0, sub { 639 $rw = AE::io $fh, 0, sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines