NAME

Net::Curl::Promiser::Select

DESCRIPTION

This module implements Net::Curl::Promiser via Perl’s select() built-in.

See /examples in the distribution for a fleshed-out demonstration.

This is “the hard way” to do this, by the way. Your life will be simpler if you use (or create) an event-loop-based implementation like Net::Curl::Promiser::AnyEvent or Net::Curl::Promiser::IOAsync. See /examples for comparisons.

process( $READ_MASK, $WRITE_MASK )

Instances of this class should pass the read and write bitmasks to the process() method that otherwise would be passed to Perl’s select() built-in.

METHODS

The following are added in addition to the base class methods:

($rmask, $wmask, $emask) = OBJ->get_vecs();

Returns the bitmasks to use as input to select().

Note that, since these are copies of OBJ’s internal values, you don’t need to copy them again before calling select().

@fds = OBJ->get_fds();

Returns the file descriptors that OBJ tracks—or, in scalar context, the count of such. Useful to check for exception events.

@fds = OBJ->get_timeout();

Translates the base class’s implementation of this method to seconds (since that’s what select() expects).