… | … | ||
---|---|---|---|
202 | } | 202 | } |
203 | 203 | ||
204 | sub monitor { | 204 | sub 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 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |