AnyEvent-Filesys-Notify

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    This is a very inefficient implementation. Use one of the others if
    possible.

Why Another Module For File System Notifications
    At the time of writing there were several very nice modules that
    accomplish the task of watching files or directories and providing
    notifications about changes. Two of which offer a unified interface that
    work on any system: Filesys::Notify::Simple and File::ChangeNotify.

    AnyEvent::Filesys::Notify exists because I need a way to simply tie the
    functionality those modules provide into an event framework. Neither of
    the existing modules seem to work with well with an event loop.
    Filesys::Notify::Simple does not supply a non-blocking interface and
    File::ChangeNotify requires you to poll an method for new events. You
    could fork off a process to run Filesys::Notify::Simple and use an event
    handler to watch for notices from that child, or setup a timer to check
    File::ChangeNotify at regular intervals, but both of those approaches
    seem inefficient or overly complex. Particularly, since the underlying
    watcher implementations (Mac::FSEvents and Linux::INotify2) provide a
    filehandle that you can use and IO event to watch.

README.md  view on Meta::CPAN

This is a very inefficient implementation. Use one of the others if possible.

# Why Another Module For File System Notifications

At the time of writing there were several very nice modules that accomplish
the task of watching files or directories and providing notifications about
changes. Two of which offer a unified interface that work on any system:
[Filesys::Notify::Simple](https://metacpan.org/pod/Filesys::Notify::Simple) and [File::ChangeNotify](https://metacpan.org/pod/File::ChangeNotify).

[AnyEvent::Filesys::Notify](https://metacpan.org/pod/AnyEvent::Filesys::Notify) exists because I need a way to simply tie the
functionality those modules provide into an event framework. Neither of the
existing modules seem to work with well with an event loop.
[Filesys::Notify::Simple](https://metacpan.org/pod/Filesys::Notify::Simple) does not supply a non-blocking interface and
[File::ChangeNotify](https://metacpan.org/pod/File::ChangeNotify) requires you to poll an method for new events. You could
fork off a process to run [Filesys::Notify::Simple](https://metacpan.org/pod/Filesys::Notify::Simple) and use an event handler
to watch for notices from that child, or setup a timer to check
[File::ChangeNotify](https://metacpan.org/pod/File::ChangeNotify) at regular intervals, but both of those approaches seem
inefficient or overly complex. Particularly, since the underlying watcher
implementations ([Mac::FSEvents](https://metacpan.org/pod/Mac::FSEvents) and [Linux::INotify2](https://metacpan.org/pod/Linux::INotify2)) provide a filehandle
that you can use and IO event to watch.

lib/AnyEvent/Filesys/Notify.pm  view on Meta::CPAN

This is a very inefficient implementation. Use one of the others if possible.

=head1 Why Another Module For File System Notifications

At the time of writing there were several very nice modules that accomplish
the task of watching files or directories and providing notifications about
changes. Two of which offer a unified interface that work on any system:
L<Filesys::Notify::Simple> and L<File::ChangeNotify>.

L<AnyEvent::Filesys::Notify> exists because I need a way to simply tie the
functionality those modules provide into an event framework. Neither of the
existing modules seem to work with well with an event loop.
L<Filesys::Notify::Simple> does not supply a non-blocking interface and
L<File::ChangeNotify> requires you to poll an method for new events. You could
fork off a process to run L<Filesys::Notify::Simple> and use an event handler
to watch for notices from that child, or setup a timer to check
L<File::ChangeNotify> at regular intervals, but both of those approaches seem
inefficient or overly complex. Particularly, since the underlying watcher
implementations (L<Mac::FSEvents> and L<Linux::INotify2>) provide a filehandle
that you can use and IO event to watch.



( run in 0.741 second using v1.01-cache-2.11-cpan-140bd7fdf52 )