--- AnyEvent-MP/MP.pm 2009/08/01 10:02:33 1.6 +++ AnyEvent-MP/MP.pm 2009/08/01 15:04:30 1.7 @@ -261,7 +261,7 @@ } for (@{ $port->{any} }) { - $_ && [@_[0..$#{$_->[1]}]] ~~ $_->[1] + $_ && [@_[0..$#{$_->[1]}]] ~~ $_->[1] && &{$_->[0]} && undef $_; } @@ -399,13 +399,21 @@ $NODE{""} = new AnyEvent::MP::Node::Self noderef => $NODE; _new_port ""; +=item devnull => ... + +Generic data sink/CPU heat conversion. + +=cut + +rcv "", devnull => sub { () }; + =item relay => $port, @msg Simply forwards the message to the given port. =cut -rcv "", relay => \&snd; +rcv "", relay => sub { \&snd; () }; =item eval => $string[ @reply] @@ -422,6 +430,7 @@ my (undef, $string, @reply) = @_; my @res = eval $string; snd @reply, "$@", @res if @reply; + () }; =item time => @reply @@ -436,7 +445,7 @@ =cut -rcv "", time => sub { shift; snd @_, AE::time }; +rcv "", time => sub { shift; snd @_, AE::time; () }; =back