--- AnyEvent-MP/MP.pm 2009/10/06 13:37:52 1.102 +++ AnyEvent-MP/MP.pm 2010/04/01 19:24:22 1.112 @@ -157,7 +157,7 @@ use base "Exporter"; -our $VERSION = 1.21; +our $VERSION = 1.28; our @EXPORT = qw( NODE $NODE *SELF node_of after @@ -193,6 +193,9 @@ to know is its own name, and optionally it should know the addresses of some other nodes in the network to discover other nodes. +The key/value pairs are basically the same ones as documented for the +F command line utility (sans the set/del prefix). + This function configures a node - it must be called exactly once (or never) before calling other AnyEvent::MP functions. @@ -408,7 +411,7 @@ "AnyEvent::MP::Port" eq ref $self or Carp::croak "$port: rcv can only be called on message matching ports, caught"; - $self->[2] = shift; + $self->[0] = shift; } else { my $cb = shift; $PORT{$portid} = sub { @@ -418,7 +421,7 @@ } } elsif (defined $_[0]) { my $self = $PORT_DATA{$portid} ||= do { - my $self = bless [$PORT{$port} || sub { }, { }, $port], "AnyEvent::MP::Port"; + my $self = bless [$PORT{$portid} || sub { }, { }, $port], "AnyEvent::MP::Port"; $PORT{$portid} = sub { local $SELF = $port; @@ -652,12 +655,12 @@ Kill the specified port with the given C<@reason>. -If no C<@reason> is specified, then the port is killed "normally" (ports -monitoring other ports will not necessarily die because a port dies -"normally"). +If no C<@reason> is specified, then the port is killed "normally" - +monitor callback will be invoked, but the kil will not cause linked ports +(C form) to get killed. -Otherwise, linked ports get killed with the same reason (second form of -C, see above). +If a C<@reason> is specified, then linked ports (C +form) get killed with the same reason. Runtime errors while evaluating C callbacks or inside C blocks will be reported as reason C<< die => $@ >>. @@ -951,8 +954,8 @@ Strings can easily be printed, easily serialised etc. and need no special procedures to be "valid". -And as a result, a miniport consists of a single closure stored in a -global hash - it can't become much cheaper. +And as a result, a port with just a default receiver consists of a single +closure stored in a global hash - it can't become much cheaper. =item Why favour JSON, why not a real serialising format such as Storable? @@ -981,6 +984,8 @@ L - network maintainance and port groups, to find your applications. +L - establish data connections between nodes. + L - simple service to display log messages from all nodes.