POSIX::1003::Events - POSIX for the file-system
use POSIX::1003::Events;
Remove the file descriptor FD from the SET. If FD is not a member of this set, there shall be no effect on the set, nor will an error be returned.
Returns true if the file descriptor FD is a member of the SET
Add the file descriptor FD to the SET If the file descriptor FD is already in this set, there is no effect on the set, nor will an error be returned.
Clear the set
If TIMEOUT is not defined, the poll will wait until something happend. When undef is returned, then there is an error. With an empy HASH returned, then the poll timed out. Otherwise, the returned HASH contains the FDs where something happened.
undef
Perl core contains two functions named select. The second is the one we need here. Without TIMEOUT, the select will wait until an event emerges (or an interrupt).
select
In the example below, $rin is a bit-set indicating on which file-descriptors should be listed for read events (data available) and $rout is a sub-set of that. The bit-sets can be manipulated with the FD_* functions also exported by this module.
$rin
$rout
FD_*
my ($nfound, $timeleft) = select($rout=$rin, $wout=$win, $eout=$ein, $timeout); my $nfound = select($rout=$rin, $wout=$win, $eout=$ein);
The select interface is inefficient when used with many filehandles. You can better use poll().
Returns a list with all known names, unsorted.
The following constants where detected on your system when the module got installed. The second column shows the value which where returned at that time.
POLLERR 8 POLLOUT 4 POLLWRBAND 512 POLLHUP 16 POLLPRI 2 POLLWRNORM 256 POLLIN 1 POLLRDBAND 128 POLLNVAL 32 POLLRDNORM 64
This module is part of POSIX-1003 distribution version 0.95, built on August 23, 2013. Website: http://perl.overmeer.net. The code is based on POSIX, which is released with Perl itself. See also POSIX::Util for additional functionality.
Copyrights 2011-2013 on the perl code and the related documentation by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
To install POSIX::1003, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POSIX::1003
CPAN shell
perl -MCPAN -e shell install POSIX::1003
For more information on module installation, please visit the detailed CPAN module installation guide.