projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
try a different way of importing Errnos
[spider.git]
/
perl
/
Msg.pm
diff --git
a/perl/Msg.pm
b/perl/Msg.pm
index 403303dd05df5bafa77a2b8bb1e37c4d09e0587f..f925681841c0746e44b7e7ee0d65b31d11a9c20c 100644
(file)
--- a/
perl/Msg.pm
+++ b/
perl/Msg.pm
@@
-15,8
+15,6
@@
use IO::Select;
use IO::Socket;
use DXDebug;
use Timer;
use IO::Socket;
use DXDebug;
use Timer;
-use Errno qw(EWOULDBLOCK EAGAIN EINPROGRESS);
-use POSIX qw(F_GETFL F_SETFL O_NONBLOCK);
use vars qw(%rd_callbacks %wt_callbacks %er_callbacks $rd_handles $wt_handles $er_handles $now %conns $noconns);
use vars qw(%rd_callbacks %wt_callbacks %er_callbacks $rd_handles $wt_handles $er_handles $now %conns $noconns);
@@
-33,9
+31,14
@@
my $blocking_supported = 0;
BEGIN {
# Checks if blocking is supported
eval {
BEGIN {
# Checks if blocking is supported
eval {
- require POSIX; POSIX->import(qw (F_SETFL O_NONBLOCK));
+ require POSIX; POSIX->import(qw (F_SETFL
F_GETFL
O_NONBLOCK));
};
$blocking_supported = 1 unless $@;
};
$blocking_supported = 1 unless $@;
+
+ # import as many of these errno values as are available
+ eval {
+ require Errno; Errno->import(qw(EAGAIN EINPROGRESS EWOULDBLOCK));
+ };
}
my $w = $^W;
}
my $w = $^W;