… | |
… | |
197 | inotify => $self, |
197 | inotify => $self, |
198 | wd => $wd, |
198 | wd => $wd, |
199 | name => $name, |
199 | name => $name, |
200 | mask => $mask, |
200 | mask => $mask, |
201 | cb => $cb, |
201 | cb => $cb, |
202 | }, Linux::Inotify2::Watch::; |
202 | }, "Linux::Inotify2::Watch"; |
203 | |
203 | |
204 | Scalar::Util::weaken $w->{inotify}; |
204 | Scalar::Util::weaken $w->{inotify}; |
205 | |
205 | |
206 | $w |
206 | $w |
207 | } |
207 | } |
… | |
… | |
263 | or next; # no such watcher |
263 | or next; # no such watcher |
264 | |
264 | |
265 | exists $self->{ignore}{$_->{wd}} |
265 | exists $self->{ignore}{$_->{wd}} |
266 | and next; # watcher has been canceled |
266 | and next; # watcher has been canceled |
267 | |
267 | |
268 | bless $_, Linux::Inotify2::Event::; |
268 | bless $_, "Linux::Inotify2::Event"; |
269 | |
269 | |
270 | push @res, $_; |
270 | push @res, $_; |
271 | |
271 | |
272 | $w->{cb}->($_) if $w->{cb}; |
272 | $w->{cb}->($_) if $w->{cb}; |
273 | $w->cancel if $_->{mask} & (IN_IGNORED | IN_UNMOUNT | IN_ONESHOT); |
273 | $w->cancel if $_->{mask} & (IN_IGNORED | IN_UNMOUNT | IN_ONESHOT); |