… | |
… | |
1156 | |
1156 | |
1157 | BEGIN { AnyEvent::common_sense } |
1157 | BEGIN { AnyEvent::common_sense } |
1158 | |
1158 | |
1159 | use Carp (); |
1159 | use Carp (); |
1160 | |
1160 | |
1161 | our $VERSION = '5.23'; |
1161 | our $VERSION = '5.24'; |
1162 | our $MODEL; |
1162 | our $MODEL; |
1163 | |
1163 | |
1164 | our $AUTOLOAD; |
1164 | our $AUTOLOAD; |
1165 | our @ISA; |
1165 | our @ISA; |
1166 | |
1166 | |
1167 | our @REGISTRY; |
1167 | our @REGISTRY; |
1168 | |
1168 | |
1169 | our $VERBOSE; |
1169 | our $VERBOSE; |
1170 | |
1170 | |
1171 | BEGIN { |
1171 | BEGIN { |
|
|
1172 | eval "sub CYGWIN(){" . (($^O =~ /cygwin/i) *1) . "}"; |
1172 | eval "sub WIN32(){ " . (($^O =~ /mswin32/i)*1) ." }"; |
1173 | eval "sub WIN32 (){" . (($^O =~ /mswin32/i)*1) . "}"; |
1173 | eval "sub TAINT(){ " . (${^TAINT}*1) . " }"; |
1174 | eval "sub TAINT (){" . (${^TAINT} *1) . "}"; |
1174 | |
1175 | |
1175 | delete @ENV{grep /^PERL_ANYEVENT_/, keys %ENV} |
1176 | delete @ENV{grep /^PERL_ANYEVENT_/, keys %ENV} |
1176 | if ${^TAINT}; |
1177 | if ${^TAINT}; |
1177 | |
1178 | |
1178 | $VERBOSE = $ENV{PERL_ANYEVENT_VERBOSE}*1; |
1179 | $VERBOSE = $ENV{PERL_ANYEVENT_VERBOSE}*1; |
… | |
… | |
1389 | warn "AnyEvent: using Time::HiRes for sub-second timing accuracy.\n" if $VERBOSE >= 8; |
1390 | warn "AnyEvent: using Time::HiRes for sub-second timing accuracy.\n" if $VERBOSE >= 8; |
1390 | *_time = \&Time::HiRes::time; |
1391 | *_time = \&Time::HiRes::time; |
1391 | # if (eval "use POSIX (); (POSIX::times())... |
1392 | # if (eval "use POSIX (); (POSIX::times())... |
1392 | } else { |
1393 | } else { |
1393 | warn "AnyEvent: using built-in time(), WARNING, no sub-second resolution!\n" if $VERBOSE; |
1394 | warn "AnyEvent: using built-in time(), WARNING, no sub-second resolution!\n" if $VERBOSE; |
1394 | *_time = sub { time }; # epic fail |
1395 | *_time = sub (){ time }; # epic fail |
1395 | } |
1396 | } |
1396 | |
1397 | |
1397 | &_time |
1398 | &_time |
1398 | } |
1399 | } |
1399 | |
1400 | |