--- AnyEvent-MP/MP.pm 2009/08/04 23:16:57 1.29 +++ AnyEvent-MP/MP.pm 2009/08/04 23:35:51 1.30 @@ -55,7 +55,7 @@ A port id is normaly the concatenation of a noderef, a hash-mark (C<#>) as separator, and a port name (a printable string of unspecified format). An -exception is the the node port, whose ID is identical to it's node +exception is the the node port, whose ID is identical to its node reference. =item node @@ -242,12 +242,13 @@ =cut sub mon { - my ($noderef, $port, $cb) = ((split /#/, shift, 2), shift); + my ($noderef, $port) = split /#/, shift, 2; my $node = $NODE{$noderef} || add_node $noderef; - #TODO: ports must not be references - if (!ref $cb or "AnyEvent::MP::Port" eq ref $cb) { + my $cb = shift; + + unless (ref $cb) { if (@_) { # send a kill info message my (@msg) = ($cb, @_);