AnyEvent-Filesys-Watcher
view release on metacpan or search on metacpan
lib/AnyEvent/Filesys/Watcher.pod view on Meta::CPAN
See L</"DIFFERENCES TO AnyEvent::Filesys::Notify"> for other differences.
=head1 CONSTRUCTORS
The following constructors are available:
=over 4
=item B<new(OPTIONS)>
Creates a new B<AnyEvent::Filesys::Watcher>. The constructor may throw an
exception in case of an error!
In fact, it createss an instance of one of the subclasses
L<AnyEvent::Filesys::Watcher::Fallback> (all platforms),
L<AnyEvent::Filesys::Watcher::FSEvents> (macOS),
L<AnyEvent::Filesys::Watcher::INotify2> (Linux),
L<AnyEvent::Filesys::Watcher::KQueue> (BSD/macOS),
L<AnyEvent::Filesys::Watcher::ReadDirectoryChanges> (MS-DOS aka Windows) that
all inherit from this module.
lib/AnyEvent/Filesys/Watcher/FSEvents.pod view on Meta::CPAN
You should normally call the
L<constructor of the base class|AnyEvent::Filesys::Watch/"CONSTRUCTOR"> that
will pick the optimal backend for the current platform.
The following constructors are available:
=over 4
=item B<new(OPTIONS)>
Creates a new B<AnyEvent::Filesys::Watcher>. The constructor may throw an
exception in case of an error!
B<OPTIONS> is a hash of named options (all other options are passed verbatim
to the constructor of L<Mac::FSEvents>):
=over 8
=item B<directories DIRECTORIES>
B<DIRECTORIES> is a reference to an array of directories to monitor. A single
lib/AnyEvent/Filesys/Watcher/Fallback.pod view on Meta::CPAN
You should normally call the
L<constructor of the base class|AnyEvent::Filesys::Watch/"CONSTRUCTOR"> that
will pick the optimal backend for the current platform.
The following constructors are available:
=over 4
=item B<new(OPTIONS)>
Creates a new B<AnyEvent::Filesys::Watcher>. The constructor may throw an
exception in case of an error!
B<OPTIONS> is a hash of named options:
=over 8
=item B<directories DIRECTORIES>
B<DIRECTORIES> is a reference to an array of directories to monitor. A single
directory can also be passed as a scalar.
lib/AnyEvent/Filesys/Watcher/Inotify2.pod view on Meta::CPAN
You should normally call the
L<constructor of the base class|AnyEvent::Filesys::Watch/"CONSTRUCTOR"> that
will pick the optimal backend for the current platform.
The following constructors are available:
=over 4
=item B<new(OPTIONS)>
Creates a new B<AnyEvent::Filesys::Watcher>. The constructor may throw an
exception in case of an error!
B<OPTIONS> is a hash of named options:
=over 8
=item B<directories DIRECTORIES>
B<DIRECTORIES> is a reference to an array of directories to monitor. A single
directory can also be passed as a scalar.
lib/AnyEvent/Filesys/Watcher/KQueue.pod view on Meta::CPAN
You should normally call the
L<constructor of the base class|AnyEvent::Filesys::Watch/"CONSTRUCTOR"> that
will pick the optimal backend for the current platform.
The following constructors are available:
=over 4
=item B<new(OPTIONS)>
Creates a new B<AnyEvent::Filesys::Watcher::KQueue>. The constructor may throw an
exception in case of an error!
B<OPTIONS> is a hash of named options:
=over 8
=item B<directories DIRECTORIES>
B<DIRECTORIES> is a reference to an array of directories to monitor. A single
directory can also be passed as a scalar.
lib/AnyEvent/Filesys/Watcher/ReadDirectoryChanges.pod view on Meta::CPAN
You should normally call the
L<constructor of the base class|AnyEvent::Filesys::Watch/"CONSTRUCTOR"> that
will pick the optimal backend for the current platform.
The following constructors are available:
=over 4
=item B<new(OPTIONS)>
Creates a new B<AnyEvent::Filesys::Watcher>. The constructor may throw an
exception in case of an error!
B<OPTIONS> is a hash of named options:
=over 8
=item B<directories DIRECTORIES>
B<DIRECTORIES> is a reference to an array of directories to monitor. A single
directory can also be passed as a scalar.
t/11-plugin-default.t view on Meta::CPAN
$backend = 'Inotify2';
} elsif ('darwin' eq $^O) {
$backend = 'FSEvents';
} elsif ('MSWin32' eq $^O || 'cygwin' eq $^O) {
$backend = 'ReadDirectoryChanges';
} elsif ($^O =~ /bsd/i) {
$backend = 'KQueue';
} else {
skip 'Test for Mac/Linux/MS-DOS/BSD only', 1;
}
throws_ok {
AnyEvent::Filesys::Watcher->new(
directories => ['t'],
callback => sub { },
backend => $backend,
);
}
qr/you may need to install the [_0-9a-zA-Z:]+ module/, 'fails ok';
}
done_testing;
( run in 0.427 second using v1.01-cache-2.11-cpan-496ff517765 )