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

Comparing AnyEvent-MP/MP/Node.pm (file contents):
Revision 1.13 by root, Wed Aug 5 22:40:51 2009 UTC vs.
Revision 1.14 by root, Sat Aug 8 00:22:16 2009 UTC

202} 202}
203 203
204sub monitor { 204sub monitor {
205 my ($self, $portid, $cb) = @_; 205 my ($self, $portid, $cb) = @_;
206 206
207 return $cb->() 207 return $cb->(no_such_port => "cannot monitor nonexistent port")
208 unless exists $AnyEvent::MP::Base::PORT{$portid}; 208 unless exists $AnyEvent::MP::Base::PORT{$portid};
209 209
210 $AnyEvent::MP::Base::LMON{$portid}{$cb+0} = $cb; 210 $AnyEvent::MP::Base::LMON{$portid}{$cb+0} = $cb;
211} 211}
212 212

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines