Out of habit, I tend to use `-w' to enable Perl warnings when
running prove, leading to:

  Ambiguous call resolved as CORE::sleep(), qualify as such or use & at \
  ./t/lib/MemcachedTest.pm line 367.

Since Time::HiRes is already used by the test suite, we can just
use the high-resolution sleep from that module rather than
defining our own select-based sleep.  sleep has been a part of
Time::HiRes since Time::HiRes was added to the standard library
for before Perl 5.8.0:

   
https://perl5.git.perl.org/perl5.git/commit/dcf686c9ff9829ff83c8d4e65b735a4ba6a9e6f5
   (Integrate Time::Hires 1.20 from Douglas E. Wegscheid., 2001-04-12)
---
 t/lib/MemcachedTest.pm | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/t/lib/MemcachedTest.pm b/t/lib/MemcachedTest.pm
index 4b2d409e..0141ec13 100644
--- a/t/lib/MemcachedTest.pm
+++ b/t/lib/MemcachedTest.pm
@@ -5,6 +5,7 @@ use IO::Socket::UNIX;
 use POSIX ":sys_wait_h";
 use Exporter 'import';
 use Carp qw(croak);
+use Time::HiRes qw(sleep);
 use vars qw(@EXPORT);
 
 # Instead of doing the substitution with Autoconf, we assume that
@@ -35,11 +36,6 @@ my $server_key = $testdir . SRV_KEY;
 
 my $tls_checked = 0;
 
-sub sleep {
-    my $n = shift;
-    select undef, undef, undef, $n;
-}
-
 # Wait until all items have flushed
 sub wait_ext_flush {
     my $sock = shift;

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/memcached/20230216230054.44340-1-e%4080x24.org.

Reply via email to