… | |
… | |
208 | # this function adds a node-ref, so you can send stuff to it |
208 | # this function adds a node-ref, so you can send stuff to it |
209 | # it is basically the central routing component. |
209 | # it is basically the central routing component. |
210 | sub add_node { |
210 | sub add_node { |
211 | my ($node) = @_; |
211 | my ($node) = @_; |
212 | |
212 | |
213 | defined $node #d#UGLY |
213 | length $node |
214 | or Carp::croak "'undef' is not a valid node ID/port ID"; |
214 | or Carp::croak "'undef' or the empty string are not valid node/port IDs"; |
215 | |
215 | |
216 | $NODE{$node} ||= new AnyEvent::MP::Node::Remote $node |
216 | $NODE{$node} ||= new AnyEvent::MP::Node::Remote $node |
217 | } |
217 | } |
218 | |
218 | |
219 | sub snd(@) { |
219 | sub snd(@) { |