Lines Matching refs:sel
17 my $sel = new IO::Select(\*STDIN);
18 $sel->add(4, 5) == 2 or print "not ";
21 $sel->add([\*STDOUT, 'foo']) == 1 or print "not ";
24 @handles = $sel->handles;
25 print "not " unless $sel->count == 4 && @handles == 4;
27 #print $sel->as_string, "\n";
29 $sel->remove(\*STDIN) == 1 or print "not ";
32 $sel->remove(\*STDIN, 5, 6) == 1 # two of there are not present
36 print "not " unless $sel->count == 2;
38 #print $sel->as_string, "\n";
40 $sel->remove(1, 4);
41 print "not " unless $sel->count == 0 && !defined($sel->bits);
44 $sel = new IO::Select;
45 print "not " unless $sel->count == 0 && !defined($sel->bits);
48 $sel->remove([\*STDOUT, 5]);
49 print "not " unless $sel->count == 0 && !defined($sel->bits);
56 $sel->add(\*STDOUT); # update
60 @a = $sel->can_read(); # should return imediately
65 $sel->add([\*STDOUT, "ok 12\n"]);
67 @a = $sel->can_write;
74 $sel->add(\*STDOUT); # update
76 @a = IO::Select::select(undef, $sel, undef, 1);
90 $sel->exists(\*STDIN) and print "not ";
93 ($sel->exists(0) || $sel->exists([\*STDERR])) and print "not ";
96 $fd = $sel->exists(\*STDOUT);
103 $fd = $sel->exists([1, 'foo']);
111 $sel->add(5,6,7,8,9,10);
112 print "not " unless $sel->count == 7;
115 $sel->remove($sel->handles);
116 print "not " unless $sel->count == 0 && !defined($sel->bits);