Apache-TieBucketBrigade
view release on metacpan or search on metacpan
lib/Apache/TieBucketBrigade.pm view on Meta::CPAN
252627282930313233343536373839404142434445__PACKAGE__->mk_classdata(
'handles'
);
__PACKAGE__->{handles} = {};
GLOBAL_select
=>
sub
{
if
(
@_
== 1) {
#ignore selecting filehandle
my
$sh
=
shift
;
unless
(
ref
(
$sh
)) {
my
$caller
=
caller
();
$sh
= \*{
$caller
.
'::'
.
$sh
};
}
return
CORE::
select
();
}
elsif
(
@_
== 4) {
my
@bits
=
@_
;
foreach
my
$fn
(
keys
%{__PACKAGE__->{handles}} ) {
#check each phony fileno in our array to see if it matches
my
$rin
=
vec
(
$bits
[0],
$fn
,1)
if
$bits
[0];
my
$win
=
vec
(
$bits
[1],
$fn
,1)
if
$bits
[1];
( run in 0.272 second using v1.01-cache-2.11-cpan-55f5a4728d2 )