… | |
… | |
33 | use Coro; |
33 | use Coro; |
34 | use Coro::Event; |
34 | use Coro::Event; |
35 | |
35 | |
36 | use base Exporter::; |
36 | use base Exporter::; |
37 | |
37 | |
38 | our $VERSION = 1.5; |
38 | our $VERSION = 1.51; |
39 | our @EXPORT_OK = "select"; |
39 | our @EXPORT_OK = "select"; |
40 | |
40 | |
41 | sub import { |
41 | sub import { |
42 | my $pkg = shift; |
42 | my $pkg = shift; |
43 | if (@_) { |
43 | if (@_) { |
… | |
… | |
46 | $pkg->export ("CORE::GLOBAL", "select"); |
46 | $pkg->export ("CORE::GLOBAL", "select"); |
47 | } |
47 | } |
48 | } |
48 | } |
49 | |
49 | |
50 | sub select(;*$$$) { # not the correct prototype, but well... :() |
50 | sub select(;*$$$) { # not the correct prototype, but well... :() |
51 | warn "select<@_>\n";#d# |
|
|
52 | if (@_ == 0) { |
51 | if (@_ == 0) { |
53 | return CORE::select; |
52 | return CORE::select; |
54 | } elsif (@_ == 1) { |
53 | } elsif (@_ == 1) { |
55 | return CORE::select $_[0]; |
54 | return CORE::select $_[0]; |
56 | } elsif (defined $_[3] && !$_[3]) { |
55 | } elsif (defined $_[3] && !$_[3]) { |